Skip to main content

01 - Home assignments

Android 01 - Tic-Tac-Toe

Implement Tic-Tac-Toe.

Requirements:

  • UI done purely in XML, constraintlayout, styles, drawables, include sublayouts as needed

  • achieve as realistic view as possible, game board always square, game board pattern visualised correctly (no black border)

  • rotation support (layout and state)

  • in portrait - top part game stats and control (new game), bottom game board area. in landscape - left stats/control, board right

  • dark/light mode

  • 2 player and one playr modes (simple random computer moves)

  • keep track of stats - average game time, wins by X or O, wins/losses ai vs human, etc. display detailed stats on separate activity.

  • visualise winning pieces clearly

  • bonus - implement minimax with alpha-beta pruning

  • bonus - allow user to set board size and winning condition (ala 7x7 board, 4 in row)

  • bonus - allow undo of moves

  • bonus - allow rotation of game board (just game board)