Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Snake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KosmX
Snake
Commits
16497f84
Commit
16497f84
authored
4 years ago
by
161400@bme.hu
Browse files
Options
Downloads
Patches
Plain Diff
ssssnake
parent
68f02e13
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
snake.c
+20
-4
20 additions, 4 deletions
snake.c
snake.exe
+0
-0
0 additions, 0 deletions
snake.exe
with
20 additions
and
4 deletions
snake.c
+
20
−
4
View file @
16497f84
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<locale.h>
//#define windows 1
//typedef unsigned long long int pointer; //Not optimal
int
isUnicodeEncoding
=
0
;
//int isUnicodeEncoding = 0;
int
isUnicodeEncoding
(
int
set
){
static
int
bl
=
0
;
if
(
set
){
bl
=
1
;
}
return
bl
;
}
typedef
enum
Direcion
{
UP
,
...
...
@@ -94,7 +102,7 @@ void printChar(unichar c){
//fueoetoeoecsoeoe *next
int
readFile
(
FILE
*
file
,
Matrix
*
matrix
){
int
c
,
len
,
maxLineLen
=
0
,
lineCount
=
(
3
,
1
),
lineLen
=
0
;
int
c
,
len
,
maxLineLen
=
0
,
lineCount
=
(
3
,
1
),
lineLen
=
0
;
//lineCount = (3,1) ??? why?... i was just bored
struct
Vec2i
pos
;
pos
.
x
=
0
;
pos
.
y
=
0
;
...
...
@@ -238,6 +246,14 @@ int core(int argc, char const *argv[])
{
FILE
*
f
;
Matrix
map
;
//----init tasks----
if
()
setlocale
(
LC_ALL
,
".utf-8"
);
//----import map----
if
(
argc
==
1
){
printf
(
"Usage: snake <map name> [<snake skin>]"
);
return
0
;
...
...
@@ -272,9 +288,9 @@ int main(int argc, char const *argv[])
int
main
(
int
argc
,
char
const
*
argv
[])
{
2
+
3
;
2
+
3
;
//... this does nothing...
int
ret
;
char
const
*
array
[]
=
{
argv
[
0
],
"map1
_e
.txt"
};
char
const
*
array
[]
=
{
argv
[
0
],
"map1.txt"
};
ret
=
core
(
2
,
array
);
printf
(
"
\n
press any key to continue"
);
getchar
();
...
...
This diff is collapsed.
Click to expand it.
snake.exe
+
0
−
0
View file @
16497f84
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment