most likely fixed the ai; it atleast isnt making dumb moves anymore

This commit is contained in:
michiel
2025-09-18 10:15:51 +02:00
parent 82fd67d351
commit 593ff2696c
3 changed files with 31 additions and 19 deletions

4
.idea/misc.xml generated
View File

@@ -8,5 +8,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="openjdk-ea-25" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="openjdk-ea-25" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project> </project>

44
.idea/workspace.xml generated
View File

@@ -5,8 +5,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="997b32da-b4d4-48ac-ab51-52d65f364f81" name="Changes" comment=""> <list default="true" id="997b32da-b4d4-48ac-ab51-52d65f364f81" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/org/toop/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/toop/Main.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/org/toop/game/tictactoe/MinMaxTicTacToe.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/toop/game/tictactoe/MinMaxTicTacToe.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -21,24 +22,29 @@
</option> </option>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="ServerManager" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="GitHubPullRequestSearchHistory"><![CDATA[{ <component name="GitHubPullRequestSearchHistory">{
"lastFilter": { &quot;lastFilter&quot;: {
"state": "OPEN", &quot;state&quot;: &quot;OPEN&quot;,
"assignee": "BAFGdeJong" &quot;assignee&quot;: &quot;BAFGdeJong&quot;
} }
}]]></component> }</component>
<component name="GithubPullRequestsUISettings"><![CDATA[{ <component name="GithubPullRequestsUISettings">{
"selectedUrlAndAccountId": { &quot;selectedUrlAndAccountId&quot;: {
"url": "git@github.com:2OOP/pism_ttt.git", &quot;url&quot;: &quot;git@github.com:2OOP/pism_ttt.git&quot;,
"accountId": "7694f583-f911-4763-8185-8ea3ed608804" &quot;accountId&quot;: &quot;7694f583-f911-4763-8185-8ea3ed608804&quot;
} }
}]]></component> }</component>
<component name="ProjectColorInfo"><![CDATA[{ <component name="ProjectColorInfo">{
"customColor": "", &quot;customColor&quot;: &quot;&quot;,
"associatedIndex": 1 &quot;associatedIndex&quot;: 1
}]]></component> }</component>
<component name="ProjectId" id="32pVUB4kZJjWp5yY5oJOqsrZhDL" /> <component name="ProjectId" id="32pVUB4kZJjWp5yY5oJOqsrZhDL" />
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
@@ -47,16 +53,20 @@
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent"><![CDATA[{
"keyToString": { "keyToString": {
"Application.Main.executor": "Run", "Application.Main.executor": "Run",
"JUnit.MinMaxTicTacToeTest.executor": "Run",
"ModuleVcsDetector.initialDetectionPerformed": "true", "ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
"RunOnceActivity.git.unshallow": "true", "RunOnceActivity.git.unshallow": "true",
"git-widget-placeholder": "ServerManager", "git-widget-placeholder": "Michiel",
"node.js.detected.package.eslint": "true", "node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true", "node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)", "node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)", "node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm", "nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"settings.editor.selected.configurable": "reference.settings.project.statistic.project.settings", "settings.editor.selected.configurable": "reference.settings.project.statistic.project.settings",
"vue.rearranger.settings.migration": "true" "vue.rearranger.settings.migration": "true"
} }
@@ -64,7 +74,7 @@
<component name="RunManager"> <component name="RunManager">
<configuration name="Main" type="Application" factoryName="Application" nameIsGenerated="true"> <configuration name="Main" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.toop.Main" /> <option name="MAIN_CLASS_NAME" value="org.toop.Main" />
<module name="pism" /> <module name="pis" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="org.toop.*" /> <option name="PATTERN" value="org.toop.*" />

View File

@@ -59,7 +59,7 @@ public class MinMaxTicTacToe {
else { else {
boolean empty = false; boolean empty = false;
for (char cell : game.grid) { // else, look at draw conditions. we check per cell if it's empty or not for (char cell : game.grid) { // else, look at draw conditions. we check per cell if it's empty or not
if (cell == ' ') { if (cell == GameBase.EMPTY) {
empty = true; // if a thing is empty, set to true empty = true; // if a thing is empty, set to true
break; // break the loop break; // break the loop
} }