From 2af1ec8dfd9718bf969e4c4428d7eb933ee8dcfa Mon Sep 17 00:00:00 2001 From: Beppe Vanrolleghem Date: Sat, 11 Jan 2020 01:31:18 +0100 Subject: [PATCH] we zijn begonnen --- .idea/.gitignore | 2 ++ .idea/codeStyles/codeStyleConfig.xml | 5 +++++ .idea/misc.xml | 13 +++++++++++ .idea/modules.xml | 8 +++++++ .idea/vcs.xml | 6 +++++ project/battleShipAi.iml | 15 +++++++++++++ project/pom.xml | 12 ++++++++++ .../java/com/battleShipAi/BattleShip.java | 22 +++++++++++++++++++ 8 files changed, 83 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 project/battleShipAi.iml create mode 100644 project/pom.xml create mode 100644 project/src/main/java/com/battleShipAi/BattleShip.java diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e7e9d11 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4f62f2e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..65eff8f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/project/battleShipAi.iml b/project/battleShipAi.iml new file mode 100644 index 0000000..e9c46ff --- /dev/null +++ b/project/battleShipAi.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/project/pom.xml b/project/pom.xml new file mode 100644 index 0000000..1325ccb --- /dev/null +++ b/project/pom.xml @@ -0,0 +1,12 @@ + + + 4.0.0 + + org.example + battleShipAiTest + 1.0-SNAPSHOT + + + \ No newline at end of file diff --git a/project/src/main/java/com/battleShipAi/BattleShip.java b/project/src/main/java/com/battleShipAi/BattleShip.java new file mode 100644 index 0000000..bd7ecd8 --- /dev/null +++ b/project/src/main/java/com/battleShipAi/BattleShip.java @@ -0,0 +1,22 @@ +package com.battleShipAi; + +public class BattleShip { + int[][] field; + int width; + int height; + + + public BattleShip(int width, int height) { + this.width = width; + this.height = height; + field = new int[width][height]; + for (int[] row : field) { + for (int cell: row) { + cell = 0; + } + } + } + + + +}