ok, so Drakkcon made a tic tac toe game in c# and by the gods! its 5megs big and the code is just awful. time for another "code by the seat of my pants" session!
ok, we're going to do a few things differently than him. for one, i'm going to make a 3x3 array of labels. we'll make one and copy it 8 times, arranging them around the single one. lets start with that. [working]
hmm. making a copy of an object isn't as easy as i want. i want to clone it, but i can't remember.. [working] nope, i had to manually do it. oh well. lets see if it works [working] oops, i forgot to Controls.Add() the labels ^_^ [working]
yeah ok now it works right. i also added a Click event handler for each one that actually uses the same function for every one. right now i've got it changing the text from X to O every click. next i'm going to put in the actual game. [working]
ok the game's all but done. the only (big) problem now is that there's no tie situation test. because of that, and the computer's (stupid) AI, when it gets to a tie and all spaces are taken, the game locks up tight. how do i fix that? well, first i should be checking for a tie - if all spaces are taken and we haven't announced a win, then we have to have a tie. we need to check for a tie before we let the computer run its AI, because its set to just look forever until it randomly finds an empty spot. that would finish things off. [working]
jenn just suggested we let the game track your name so it says it to you in the win message. that's easy. but, how do we want to get the name to start with? the simplest thing i can think of is to just have a textbox right on the game that has your name in it and you can click on it to change it any time you want. [talking]
thats in now. now the last thing i see that he has is that you can choose whether you're X or O. when you choose a different one, you reset the board and thats that. personally i don't think you should have the option to change betwen X and O, because the player could get up and then sit back down at the game 5min later and wonder whether they were X or O. if the player is always X, there's no confusion. i suppose a way to alleviate that problem would be to tell the player whether they were X or O by the player's name. that works well enough for me.
i don't like how he has two buttons at the bottom that let you choose X or O, its cludgy and doesn't seem like the bestest way to go about it. i'm thinking that adding a new menu item 'New Game' and then two subitems 'As X' and 'As O' would work better. [working] yeah, its good that way. building a new version and uploading. oops, its 5.31 KB (5,441 bytes) big, zipped. Drakkcon: What's next? [grin]