Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

adbaga / Ics0016-2019f

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 714a0dee authored 5 years ago by adbaga's avatar adbaga
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

commit 3

parent 06a2f5ca master
Show whitespace changes
Inline Side-by-side
Showing with 109 additions and 15 deletions
  • .idea/.idea.IDoMinesweeper/.idea/workspace.xml
  • ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.dll
  • ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.pdb
  • Game/Engine.cs
  • Game/bin/Debug/netcoreapp3.0/Game.dll
  • Game/bin/Debug/netcoreapp3.0/Game.pdb
  • Game/obj/Debug/netcoreapp3.0/Game.csprojAssemblyReference.cache
  • Game/obj/Debug/netcoreapp3.0/Game.dll
  • Game/obj/Debug/netcoreapp3.0/Game.pdb
  • IDoMinesweeper/Program.cs
  • IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.dll
  • IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.pdb
  • IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll
  • IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb
  • IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache
  • IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.dll
  • IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.pdb
.idea/.idea.IDoMinesweeper/.idea/workspace.xml
View file @ 714a0dee
...@@ -3,7 +3,17 @@ ...@@ -3,7 +3,17 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="a128ca0c-796d-4da2-8db0-062a4837d105" name="Default Changelist" comment=""> <list default="true" id="a128ca0c-796d-4da2-8db0-062a4837d105" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.IDoMinesweeper/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.IDoMinesweeper/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/.idea.IDoMinesweeper/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.IDoMinesweeper/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.dll" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/Engine.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Engine.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/bin/Debug/netcoreapp3.0/Game.dll" beforeDir="false" afterPath="$PROJECT_DIR$/Game/bin/Debug/netcoreapp3.0/Game.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/bin/Debug/netcoreapp3.0/Game.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/Game/bin/Debug/netcoreapp3.0/Game.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.csprojAssemblyReference.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.dll" beforeDir="false" afterPath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/Game/obj/Debug/netcoreapp3.0/Game.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/Program.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/IDoMinesweeper/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/Program.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.dll" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll" afterDir="false" /> <change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache" afterDir="false" /> <change beforePath="$PROJECT_DIR$/IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache" afterDir="false" />
...@@ -39,8 +49,8 @@ ...@@ -39,8 +49,8 @@
<option value="$PROJECT_DIR$/ConsoleUserInt/Class1.cs" /> <option value="$PROJECT_DIR$/ConsoleUserInt/Class1.cs" />
<option value="$PROJECT_DIR$/Game/CellState.cs" /> <option value="$PROJECT_DIR$/Game/CellState.cs" />
<option value="$PROJECT_DIR$/ConsoleUserInt/GameUI.cs" /> <option value="$PROJECT_DIR$/ConsoleUserInt/GameUI.cs" />
<option value="$PROJECT_DIR$/Game/Engine.cs" />
<option value="$PROJECT_DIR$/MenuSystem/Menu.cs" /> <option value="$PROJECT_DIR$/MenuSystem/Menu.cs" />
<option value="$PROJECT_DIR$/Game/Engine.cs" />
<option value="$PROJECT_DIR$/IDoMinesweeper/Program.cs" /> <option value="$PROJECT_DIR$/IDoMinesweeper/Program.cs" />
</list> </list>
</option> </option>
...@@ -104,7 +114,7 @@ ...@@ -104,7 +114,7 @@
<workItem from="1570541467008" duration="1357000" /> <workItem from="1570541467008" duration="1357000" />
<workItem from="1570543449378" duration="28421000" /> <workItem from="1570543449378" duration="28421000" />
<workItem from="1570828559519" duration="1080000" /> <workItem from="1570828559519" duration="1080000" />
<workItem from="1570969640551" duration="1737000" /> <workItem from="1570969640551" duration="3567000" />
</task> </task>
<task id="LOCAL-00001" summary="yes"> <task id="LOCAL-00001" summary="yes">
<created>1570973690674</created> <created>1570973690674</created>
...@@ -113,7 +123,14 @@ ...@@ -113,7 +123,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1570973690675</updated> <updated>1570973690675</updated>
</task> </task>
<option name="localTasksCounter" value="2" /> <task id="LOCAL-00002" summary="Adding validation input: Doesn't accept non int and set maximum size of the board">
<created>1570997742575</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1570997742575</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -135,7 +152,8 @@ ...@@ -135,7 +152,8 @@
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="true" /> <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="true" />
<MESSAGE value="yes" /> <MESSAGE value="yes" />
<option name="LAST_COMMIT_MESSAGE" value="yes" /> <MESSAGE value="Adding validation input: Doesn't accept non int and set maximum size of the board" />
<option name="LAST_COMMIT_MESSAGE" value="Adding validation input: Doesn't accept non int and set maximum size of the board" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
......
This diff is collapsed. Click to expand it.
ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
ConsoleUserInt/bin/Debug/netcoreapp3.0/Game.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
Game/Engine.cs
View file @ 714a0dee
...@@ -77,6 +77,73 @@ namespace Engine ...@@ -77,6 +77,73 @@ namespace Engine
} }
/*public class ReceiveInput
{
Console.WriteLine("Board height (Min. 8): ");
Console.WriteLine(">");
var checkHeight = Console.ReadLine();
int height = 0;
if (!int.TryParse(checkHeight, out height))
{
Console.WriteLine("Not an integer");
}
else
{
height = Convert.ToInt32(checkHeight);
}
var checkWidth = Console.ReadLine();
int width = 0;
if (!int.TryParse(checkWidth, out width))
{
Console.WriteLine("Not an integer");
}
else
{
width = Convert.ToInt32(checkWidth);
}
//var width = Convert.ToInt32(ReadLine());
var doIt = false;
do
{
if (height < 8 || width < 8)
{
Console.WriteLine("Too small. Minimal is 8x8");
break;
}
else if(height > 30 || width > 30)
{
Console.WriteLine("Too big. Maximum size is 30x30");
break;
}
} while (doIt = false);
var game = new BoardDim(height, width);
//previously game
var done = false;
}
*/
public void checkTile(int posY, int posX) public void checkTile(int posY, int posX)
{ {
var done = -1; var done = -1;
......
This diff is collapsed. Click to expand it.
Game/bin/Debug/netcoreapp3.0/Game.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
Game/bin/Debug/netcoreapp3.0/Game.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
Game/obj/Debug/netcoreapp3.0/Game.csprojAssemblyReference.cache
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
Game/obj/Debug/netcoreapp3.0/Game.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
Game/obj/Debug/netcoreapp3.0/Game.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/Program.cs
View file @ 714a0dee
...@@ -81,6 +81,11 @@ namespace IDoMinesweeper ...@@ -81,6 +81,11 @@ namespace IDoMinesweeper
{ {
// do do-while and if it's correct it'll be done. Otherwise, it's gonna keep asking for input'''' // do do-while and if it's correct it'll be done. Otherwise, it's gonna keep asking for input''''
//var customizeBoard = new Engine.ReceiveInput(); would be used for
//future improvement to check and
//validate input
WriteLine("Board height (Min. 8): "); WriteLine("Board height (Min. 8): ");
WriteLine(">"); WriteLine(">");
var checkHeight = ReadLine(); var checkHeight = ReadLine();
...@@ -107,7 +112,7 @@ namespace IDoMinesweeper ...@@ -107,7 +112,7 @@ namespace IDoMinesweeper
var checkWidth = ReadLine(); var checkWidth = ReadLine();
int width = 0; int width = 0;
if (!int.TryParse(checkHeight, out height)) if (!int.TryParse(checkWidth, out width))
{ {
Console.WriteLine("Not an integer"); Console.WriteLine("Not an integer");
} }
...@@ -115,7 +120,7 @@ namespace IDoMinesweeper ...@@ -115,7 +120,7 @@ namespace IDoMinesweeper
{ {
width = Convert.ToInt32(checkWidth); width = Convert.ToInt32(checkWidth);
} }
//var width = Convert.ToInt32(ReadLine());
var doIt = false; var doIt = false;
do do
...@@ -124,32 +129,36 @@ namespace IDoMinesweeper ...@@ -124,32 +129,36 @@ namespace IDoMinesweeper
if (height < 8 || width < 8) if (height < 8 || width < 8)
{ {
Console.WriteLine("Too small. Minimal is 8x8"); Console.WriteLine("Too small. Minimal board size is 8x8");
return ""; return "";
break;
} }
else if(height > 30 || width > 30) else if(height > 30 || width > 30)
{ {
Console.WriteLine("Too big. Maximum size is 30x30"); Console.WriteLine("Too big. Maximum board size is 30x30");
return ""; return "";
break;
}
else
{
doIt = true;
} }
} while (doIt = false); } while (doIt = false);
//still need improvement. If I put string, it'll say not only not int
//but also "Too small" which is weird
//and do while doesn't work as my expectation yet
//I guess it's time to start making better architecture''
var game = new BoardDim(height, width); var game = new BoardDim(height, width);
//previously game
var done = false; var done = false;
......
This diff is collapsed. Click to expand it.
IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/bin/Debug/netcoreapp3.0/Game.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/bin/Debug/netcoreapp3.0/IDoMinesweeper.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.csprojAssemblyReference.cache
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.dll
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
IDoMinesweeper/obj/Debug/netcoreapp3.0/IDoMinesweeper.pdb
View file @ 714a0dee
No preview for this file type
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment