Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
1
142GameCenter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nelson Phillips
142GameCenter
Commits
b83b2342
Commit
b83b2342
authored
Mar 12, 2019
by
Nelson Phillips
Browse files
Options
Browse Files
Download
Plain Diff
autosave
parents
2aad108b
df7e2698
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
10 additions
and
9 deletions
+10
-9
GameEngine/2048ScoreState.h
GameEngine/2048ScoreState.h
+1
-1
SaveLoad/2048Data.txt
SaveLoad/2048Data.txt
+0
-0
SaveLoad/SL2048.cpp
SaveLoad/SL2048.cpp
+2
-2
SaveLoad/SL2048.h
SaveLoad/SL2048.h
+1
-1
SaveLoad/SLSnake.cpp
SaveLoad/SLSnake.cpp
+2
-2
SaveLoad/SLSnake.h
SaveLoad/SLSnake.h
+1
-1
SaveLoad/SaveLoad.cpp
SaveLoad/SaveLoad.cpp
+0
-0
SaveLoad/SaveLoad.h
SaveLoad/SaveLoad.h
+2
-2
SaveLoad/Scores.h
SaveLoad/Scores.h
+0
-0
SaveLoad/main.cpp
SaveLoad/main.cpp
+0
-0
SaveLoad/snakedata.txt
SaveLoad/snakedata.txt
+0
-0
Snake/ReadInput.cpp
Snake/ReadInput.cpp
+0
-0
Snake/ReadInput.h
Snake/ReadInput.h
+0
-0
Snake/Snake.cpp
Snake/Snake.cpp
+0
-0
Snake/Snake.h
Snake/Snake.h
+0
-0
Snake/SnakeTest.cpp
Snake/SnakeTest.cpp
+0
-0
Snake/Threads.cpp
Snake/Threads.cpp
+0
-0
Snake/Threads.h
Snake/Threads.h
+0
-0
Snake/compile.sh
Snake/compile.sh
+1
-0
Testings/CLICK TO PLAY.sh
Testings/CLICK TO PLAY.sh
+0
-0
No files found.
GameEngine/2048ScoreState.h
View file @
b83b2342
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#define C2048SCORESTATE_H
#define C2048SCORESTATE_H
#include "GameState.h"
#include "GameState.h"
#include "../
Testings/
SaveLoad/SL2048.h"
#include "../SaveLoad/SL2048.h"
#include <iostream>
#include <iostream>
#include <string>
#include <string>
...
...
Testings/
SaveLoad/2048Data.txt
→
SaveLoad/2048Data.txt
View file @
b83b2342
File moved
Testings/
SaveLoad/SL2048.cpp
→
SaveLoad/SL2048.cpp
View file @
b83b2342
#include "SL2048.h"
#include "SL2048.h"
void
SL2048
::
LoadContainers
(){
void
SL2048
::
LoadContainers
(
string
fileName
){
ifstream
fin
;
ifstream
fin
;
fin
.
open
(
"2048Data.txt"
);
fin
.
open
(
fileName
);
if
(
!
fin
.
is_open
()){
if
(
!
fin
.
is_open
()){
cerr
<<
"Could not open file.
\n
"
;
cerr
<<
"Could not open file.
\n
"
;
exit
(
0
);
exit
(
0
);
...
...
Testings/
SaveLoad/SL2048.h
→
SaveLoad/SL2048.h
View file @
b83b2342
...
@@ -15,7 +15,7 @@ using namespace std;
...
@@ -15,7 +15,7 @@ using namespace std;
class
Scores
;
class
Scores
;
class
SL2048
:
public
SaveLoad
{
class
SL2048
:
public
SaveLoad
{
public:
public:
void
LoadContainers
();
void
LoadContainers
(
string
fileName
);
void
updateFile
(
string
fileName
);
void
updateFile
(
string
fileName
);
};
};
...
...
Testings/
SaveLoad/SLSnake.cpp
→
SaveLoad/SLSnake.cpp
View file @
b83b2342
#include "SLSnake.h"
#include "SLSnake.h"
void
SLSnake
::
LoadContainers
(){
void
SLSnake
::
LoadContainers
(
string
fileName
){
ifstream
fin
;
ifstream
fin
;
fin
.
open
(
"snakedata.txt"
);
fin
.
open
(
fileName
);
if
(
!
fin
.
is_open
()){
if
(
!
fin
.
is_open
()){
cerr
<<
"Could not open file.
\n
"
;
cerr
<<
"Could not open file.
\n
"
;
exit
(
0
);
exit
(
0
);
...
...
Testings/
SaveLoad/SLSnake.h
→
SaveLoad/SLSnake.h
View file @
b83b2342
...
@@ -15,7 +15,7 @@ using namespace std;
...
@@ -15,7 +15,7 @@ using namespace std;
class
Scores
;
class
Scores
;
class
SLSnake
:
public
SaveLoad
{
class
SLSnake
:
public
SaveLoad
{
public:
public:
void
LoadContainers
();
void
LoadContainers
(
string
fileName
);
void
updateFile
(
string
fileName
);
void
updateFile
(
string
fileName
);
};
};
...
...
Testings/
SaveLoad/SaveLoad.cpp
→
SaveLoad/SaveLoad.cpp
View file @
b83b2342
File moved
Testings/
SaveLoad/SaveLoad.h
→
SaveLoad/SaveLoad.h
View file @
b83b2342
...
@@ -18,8 +18,8 @@ class SaveLoad {
...
@@ -18,8 +18,8 @@ class SaveLoad {
public:
public:
//these functions change the files data
//these functions change the files data
virtual
void
LoadContainers
()
=
0
;
virtual
void
LoadContainers
(
string
fileName
)
=
0
;
virtual
void
updateFile
()
=
0
;
virtual
void
updateFile
(
string
fileName
)
=
0
;
//add new data into file
//add new data into file
void
sortByScore
();
void
sortByScore
();
...
...
Testings/
SaveLoad/Scores.h
→
SaveLoad/Scores.h
View file @
b83b2342
File moved
Testings/
SaveLoad/main.cpp
→
SaveLoad/main.cpp
View file @
b83b2342
File moved
Testings/
SaveLoad/snakedata.txt
→
SaveLoad/snakedata.txt
View file @
b83b2342
File moved
Testings/
Snake/ReadInput.cpp
→
Snake/ReadInput.cpp
View file @
b83b2342
File moved
Testings/
Snake/ReadInput.h
→
Snake/ReadInput.h
View file @
b83b2342
File moved
Testings/
Snake/Snake.cpp
→
Snake/Snake.cpp
View file @
b83b2342
File moved
Testings/
Snake/Snake.h
→
Snake/Snake.h
View file @
b83b2342
File moved
Testings/
Snake/SnakeTest.cpp
→
Snake/SnakeTest.cpp
View file @
b83b2342
File moved
Testings/
Snake/Threads.cpp
→
Snake/Threads.cpp
View file @
b83b2342
File moved
Testings/
Snake/Threads.h
→
Snake/Threads.h
View file @
b83b2342
File moved
Snake/compile.sh
0 → 100644
View file @
b83b2342
g++
*
.cpp
-o
main.out
-pthread
-std
=
c++11
&&
./main.out
\ No newline at end of file
Testings/
Snake/
CLICK TO PLAY.sh
→
Testings/CLICK TO PLAY.sh
View file @
b83b2342
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment