mirror of
https://github.com/bvanroll/battleShipAi.git
synced 2025-08-28 19:42:46 +00:00
we zijn begonnen
This commit is contained in:
15
project/battleShipAi.iml
Normal file
15
project/battleShipAi.iml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="12" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
12
project/pom.xml
Normal file
12
project/pom.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>battleShipAiTest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
|
||||
</project>
|
22
project/src/main/java/com/battleShipAi/BattleShip.java
Normal file
22
project/src/main/java/com/battleShipAi/BattleShip.java
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user