Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ohj1ht matopeli
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
kopperp
ohj1ht matopeli
Commits
47ba0126
Commit
47ba0126
authored
1 year ago
by
Kopperoinen Paulus Juho
Browse files
Options
Downloads
Patches
Plain Diff
Poistin kaikki loput huomautukset
parent
4531ed62
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Matopeli/Matopeli/Matopeli.cs
+20
-30
20 additions, 30 deletions
Matopeli/Matopeli/Matopeli.cs
with
20 additions
and
30 deletions
Matopeli/Matopeli/Matopeli.cs
+
20
−
30
View file @
47ba0126
using
System.Collections.Generic
;
using
Jypeli
;
// ReSharper disable InconsistentNaming
// ReSharper disable UseIndexFromEndExpression
// ReSharper disable once IdentifierTypo
// ReSharper disable CommentTypo
// ReSharper disable StringLiteralTypo
namespace
matopeli
;
/// @author Paulus Kopperoinen
...
...
@@ -31,19 +36,21 @@ public class Matopeli : PhysicsGame
"#o #"
,
"#####################"
,
};
private
Objektit
_mato
;
private
Objektit
_omena
;
private
Objektit
_matoMuu
;
p
ublic
IntMeter
Pistelaskuri
;
p
rivate
IntMeter
Pistelaskuri
;
public
IntMeter
Ennatyslaskuri
;
public
List
<
Vector
>
MatoSijainti
=
new
List
<
Vector
>();
public
List
<
PhysicsObject
>
MatoKeho
=
new
List
<
PhysicsObject
>();
public
int
Leveys
;
public
int
Korkeus
;
public
double
Nopeus
;
private
readonly
List
<
Vector
>
MatoSijainti
=
new
List
<
Vector
>();
private
readonly
List
<
PhysicsObject
>
MatoKeho
=
new
List
<
PhysicsObject
>();
private
int
Leveys
;
private
int
Korkeus
;
private
double
Nopeus
;
private
Vector
_omenaAlkuPaikka
;
...
...
@@ -58,7 +65,6 @@ public class Matopeli : PhysicsGame
private
bool
_suuntaVasen
;
private
bool
_matoLiikkunut
;
private
bool
_omenaKentalla
;
...
...
@@ -71,7 +77,7 @@ public class Matopeli : PhysicsGame
/// <summary>
/// Poistaa vanhan pelin tiedot ja alustaa uuden pelin
/// </summary>
p
ublic
void
AloitaUusiPeli
()
p
rivate
void
AloitaUusiPeli
()
{
MatoKeho
.
Clear
();
MatoSijainti
.
Clear
();
...
...
@@ -109,14 +115,12 @@ public class Matopeli : PhysicsGame
void
LuoPistelaskuri
()
{
Pistelaskuri
=
new
IntMeter
(
0
);
Label
pistenaytto
=
new
Label
();
pistenaytto
.
X
=
Screen
.
Left
+
500
;
pistenaytto
.
Y
=
Screen
.
Top
-
10
;
pistenaytto
.
TextColor
=
Color
.
B
lack
;
pistenaytto
.
Color
=
Color
.
White
;
pistenaytto
.
Y
=
Screen
.
Top
-
5
;
pistenaytto
.
TextColor
=
Color
.
B
rown
;
pistenaytto
.
Color
=
Color
.
LightGreen
;
pistenaytto
.
Title
=
"Pisteet: "
;
pistenaytto
.
BindTo
(
Pistelaskuri
);
Add
(
pistenaytto
);
}
...
...
@@ -420,7 +424,6 @@ public class Matopeli : PhysicsGame
_mato
.
Angle
=
Angle
.
FromDegrees
(
180
);
}
_matoLiikkunut
=
true
;
}
...
...
@@ -458,17 +461,4 @@ public class Matopeli : PhysicsGame
IgnoresCollisionResponse
=
true
;
}
}
}
\ No newline at end of file
}
\ No newline at end of file
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