Programming Extensions to XO Code and upload
Completion requirements
This list may be added to, all of your have attempted to solve these in class.. you need to be able to produce solutions on your own and under pressure.
1 | Validate y-axis | The Y-Axis needs a presence type and range check added |
2 | Type/presence check validation on coordinates | and some for the x-axis too |
3 | Stop the overwriting of symbols | Currently you can choose a coordinate that already has a symbol |
4 | Check diagonal for win | Currently diagonal lines don't win... change the code so they do |
5 | Name the player's go | Have it so the code says it's Bob's turn etc.. |
6 | Who is the winner? | The winner isn't named at the moment (just the symbol) add a nice msg naming the winner |
7 | Check both players don't have the same name | Having two players with the same name would be a pain.. validate this out |
8 | Change the size of the grid | A 4x4 or 5x5 grid would be nice... but it's a surprising amount of work if you have it so 3 in a line wins |
9 | Draw scores both players 0.5 points | Draws don't score at the moment. award each player 0.5 for a draw |
10 | Play the computer (random validated placing of scores) | Random is fairly easy... a player that follows a strategy is trickier but not impossible |
11 | Place the section of code where the players enter their names in a separate procedure, with the appropriate parameters passed-in. | Don't fully factorize the code.. but have a go at a new procedure call EnterPlayerName |
12 | Convert Symbol to uppercase automatically if user inputs lowercase x or o | Rather than validate the X O choice just convert it to upper case |
Upload the copy and paste of your code and screenshots of appropriate tests all packaged in an HeAD