Tic Tac Toe
This is the most exciting challenge in this course. You're going to build a two-player game of Tic Tac Toe!
Open the challenge
From Java Bootcamp Resources
-> Module 1
-> 6. Array
, open Challenge 6
.
Task 1: Create an array
The Tic Tac Toe board is a grid with three rows.
Each row has three '_
' characters. Your first task is to store these characters in an array.
Task 2: Print the array
Write a function that prints the board. Call the function after creating the board.
//Task 1: Create a board: char[][] board //Task 2: Call the function: printBoard(board);
/** * Function name - printBoard() * @param board (char[][]) * * Inside the function: * 1. print a new line. * 2. print the board. * - separate each row by two lines. * - each row precedes a tab of space * - each character in the grid has one space from the other character */
Inside the function:
- Print a new line.
- add a tab of space before each row.
- add a space after printing each character.
Good Luck!
Associated Course: The Complete Java Development Bootcamp
Related Course: The Complete Spring Boot Development Bootcamp – Become a Java Web Developer
Feedback Summary
4.7
43 students
5
91%
4
2%
3
0%
2
0%
1
7%
Written Reviews
There are no written reviews yet.