Advertisement
KodingKid

How to make a tictactoe board/screen/window in Java - Basic Scripting #22

May 31st, 2021
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. public class Game1 {
  2.     public static void main(String[] args) {
  3.         char[][] screen = {{' ', '|', ' ', '|', ' ', '-', '+', '-', '+', '-', ' ', '|', ' ', '|', ' ', '-', '+', '-', ' +', '-', ' ', '|', ' ', '|', ' '}}
  4.         for(char[] row : screen) {
  5.             for(char c : row) {
  6.                 System.out.println(c);
  7.             }
  8.             System.out.println();
  9.         }
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement