practice for programmers
Logged in as Anonymous Student
273387 Swift - Mini Test 1 (2561/1)
A. The board
Write a program that prints out a TicTacToe (noughts and crosses) board.
B. Valid moves
When playing TicTacToe, you must make a move of the form
is a string
. Write a program to check that the user's input is valid. If it is valid then output
C. Make move
Continuing from the previous question, the input is the same and it is always valid. Print out the result of the board for the first move.
D. Winning move
Write a program to determine if a winning move has been made -- 3 in a row of either X or O. Print
Winner is X
Winner is O
No winner yet