Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
harmadik_beadando_UHK213
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
Container 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
Monoki Dorina
harmadik_beadando_UHK213
Commits
ec7f7534
Commit
ec7f7534
authored
1 year ago
by
Monoki Dorina
Browse files
Options
Downloads
Patches
Plain Diff
uj szinek
parent
95f24285
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
field.cpp
+58
-13
58 additions, 13 deletions
field.cpp
field.hpp
+3
-1
3 additions, 1 deletion
field.hpp
main.cpp
+1
-1
1 addition, 1 deletion
main.cpp
save.txt
+0
-1
0 additions, 1 deletion
save.txt
widget.hpp
+9
-2
9 additions, 2 deletions
widget.hpp
with
71 additions
and
18 deletions
field.cpp
+
58
−
13
View file @
ec7f7534
...
...
@@ -3,44 +3,89 @@
using
namespace
genv
;
Field
::
Field
(
Application
*
parent
,
int
x
,
int
y
,
int
meret
,
int
ertek
)
:
Widget
(
parent
,
x
,
y
,
meret
,
meret
),
_ertek
(
ertek
)
Field
::
Field
(
Application
*
parent
,
int
x
,
int
y
,
int
meret
,
int
index
,
int
ertek
)
:
Widget
(
parent
,
x
,
y
,
meret
,
meret
),
_index
(
index
),
_ertek
(
ertek
)
{
_fix
=
_ertek
;
_aura
=
false
;
}
void
Field
::
rajzol
()
const
{
if
(
_kijelolt
)
//keret
gout
<<
color
(
light_purple
);
/// keret
if
(
_kijelolt
)
{
if
(
_fix
)
gout
<<
color
(
light_grey
);
else
gout
<<
color
(
light_purple
);
}
else
gout
<<
color
(
dark_purple
);
{
if
(
_fix
)
gout
<<
color
(
dark_grey
);
else
gout
<<
color
(
dark_purple
);
}
gout
<<
move_to
(
_x
,
_y
)
<<
box
(
_szel
,
_mag
);
if
(
_kijelolt
)
//hatter
/// hatter
if
(
_kijelolt
)
{
if
(
_fix
)
gout
<<
color
(
white
);
gout
<<
color
(
dark_grey
);
else
gout
<<
color
(
dark_purple
);
}
else
if
(
_aura
)
{
if
(
_fix
)
gout
<<
color
(
mid_grey
);
else
gout
<<
color
(
mid_purple
);
}
else
gout
<<
color
(
bg_purple
);
{
if
(
_fix
)
gout
<<
color
(
light_grey
);
else
gout
<<
color
(
light_purple
);
}
gout
<<
move_to
(
_x
+
1
,
_y
+
1
)
<<
box
(
_szel
-
2
,
_mag
-
2
);
if
(
_kijelolt
)
//szoveg
/// vonalak
if
(
_kijelolt
)
{
if
(
_fix
)
gout
<<
color
(
light_grey
);
else
gout
<<
color
(
light_purple
);
}
else
{
if
(
_fix
)
gout
<<
color
(
dark_grey
);
else
gout
<<
color
(
dark_purple
);
}
if
((
_index
%
9
)
%
3
==
0
)
// bal
gout
<<
move_to
(
_x
+
1
,
_y
)
<<
line
(
0
,
_mag
);
if
((
_index
%
9
)
%
3
==
2
)
//jobb
gout
<<
move_to
(
_x
+
_szel
-
2
,
_y
)
<<
line
(
0
,
_mag
);
/// szoveg
if
(
_kijelolt
)
{
if
(
_fix
)
gout
<<
color
(
black
);
gout
<<
color
(
light_grey
);
else
gout
<<
color
(
light_purple
);
}
else
{
if
(
_fix
)
gout
<<
color
(
black
);
gout
<<
color
(
dark_grey
);
else
gout
<<
color
(
dark_purple
);
}
...
...
This diff is collapsed.
Click to expand it.
field.hpp
+
3
−
1
View file @
ec7f7534
...
...
@@ -7,7 +7,7 @@
class
Field
:
public
Widget
{
public:
Field
(
Application
*
parent
,
int
x
,
int
y
,
int
meret
,
int
ertek
);
Field
(
Application
*
parent
,
int
x
,
int
y
,
int
meret
,
int
index
,
int
ertek
);
virtual
void
rajzol
()
const
override
;
virtual
void
kezel
(
genv
::
event
)
override
;
...
...
@@ -16,6 +16,8 @@ class Field : public Widget
protected:
int
_ertek
;
bool
_fix
;
bool
_aura
;
int
_index
;
};
...
...
This diff is collapsed.
Click to expand it.
main.cpp
+
1
−
1
View file @
ec7f7534
...
...
@@ -20,7 +20,7 @@ class MyApp : public Application
{
for
(
int
i
=
0
;
i
<
9
;
i
++
)
{
Field
*
f
=
new
Field
(
this
,
i
*
78
,
j
*
78
,
78
,
game_kezdo
[
9
*
j
+
i
]);
Field
*
f
=
new
Field
(
this
,
i
*
78
,
j
*
78
,
78
,
9
*
j
+
i
,
game_kezdo
[
9
*
j
+
i
]);
palya
.
push_back
(
f
);
}
}
...
...
This diff is collapsed.
Click to expand it.
save.txt
deleted
100644 → 0
+
0
−
1
View file @
95f24285
9 8 5 6 0 1 0 0 0 0 0 6 5 4 0 0 2 1 0 0 0 0 3 0 0 0 0 8 0 7 9 0 4 1 0 0 5 3 0 0 0 7 9 8 6 1 9 0 8 0 0 0 0 0 0 0 3 0 7 0 6 0 0 0 2 0 0 8 5 3 0 0 7 0 8 3 0 6 0 0 0
This diff is collapsed.
Click to expand it.
widget.hpp
+
9
−
2
View file @
ec7f7534
...
...
@@ -4,11 +4,18 @@
#include
"graphics.hpp"
#include
"application.hpp"
#define dark_purple 130,37,184
/*
#define dark_purple 130,37,184
#define light_purple 210,145,255
#define bg_purple 246,232,255
#define white 255,255,255
#define black 0,0,0
#define black 0,0,0*/
#define dark_purple 56,0,102
#define mid_purple 133,133,255
#define light_purple 204,204,255
#define dark_grey 51,51,51
#define mid_grey 191,191,191
#define light_grey 230,230,230
class
Widget
{
...
...
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