Skip to content

Commit c7ec2d4

Browse files
committed
Made an exe file from the project
1 parent aa3cfa3 commit c7ec2d4

31 files changed

+47
-54
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

CYPVP/.vs/CYPVP/v17/.suo

28.5 KB
Binary file not shown.

CYPVP/Character.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ public class Character
1515
public bool CanMoveDown { get; set; }
1616
public bool CanMoveRight { get; set; }
1717
public bool CanMoveLeft { get; set; }
18+
1819
public Character(PictureBox Character)
1920
{
2021
CharacterSkin = Character;
2122
CharacterSkin.BackColor = Color.Transparent;
2223
}
24+
2325
public void Move(String Position,int Speed,int Height,int Width,int x,int y)
2426
{
2527

@@ -78,6 +80,7 @@ public void Move(String Position,int Speed,int Height,int Width,int x,int y)
7880

7981

8082
}
83+
8184
public bool Check()
8285
{
8386
return CanMoveDown == false && CanMoveUp == false && CanMoveLeft == false && CanMoveRight == false;

CYPVP/Chest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Chest
1212
public PictureBox ChestSkin { get; set; }
1313
public bool isOpen { get; set; }
1414
public bool hasSpawned { get; set; }
15-
15+
1616
public Chest(PictureBox chestSkin)
1717
{
1818
ChestSkin = chestSkin;

CYPVP/ClassMenu.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ public ClassMenu()
1616
{
1717
InitializeComponent();
1818
}
19-
20-
21-
19+
2220
private void btn_CS_Click(object sender, EventArgs e)
2321
{
2422
this.DialogResult = DialogResult.OK;

CYPVP/EndGame.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CYPVP/EndGame.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public partial class EndGame : Form
1515
{
1616
public int Points { get; set; }
1717
public SoundPlayer soundPlayer { get; set; }
18+
1819
public EndGame(int points)
1920
{
2021
InitializeComponent();
@@ -50,14 +51,7 @@ public int GetGrade()
5051
if ((int)(Points / 10) >= 10) return 10;
5152
return (int)(Points / 10);
5253
}
53-
54-
private void EndGame_Load(object sender, EventArgs e)
55-
{
56-
57-
}
58-
59-
60-
54+
6155
private void button2_Click(object sender, EventArgs e)
6256
{
6357
this.Close();

CYPVP/Game.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,33 @@ public class Game
2020
public int Score { get; set; }
2121
public int Time { get; set; }
2222
public Chest Chest { get; set; }
23-
24-
23+
24+
public Game(int height,int width,PictureBox mainCharacter,PictureBox mainSlime) {
25+
MainCharacter = new Character(mainCharacter);
26+
MainSlime=new Slime(mainSlime);
27+
SetUpGame();
28+
LoadQuestions();
29+
}
30+
2531
public void LoadQuestions()
2632
{
2733
List0fQuestions.Add(new Question("Can you write a class without specifying namespace?", "Yes"));
2834
List0fQuestions.Add(new Question("Does Move and LocationChanged, Resize and SizeChanged have the same functionality?", "Yes"));
2935
}
36+
3037
public void SetUpGame()
3138
{
3239
Time = 79;
3340
Score = 0;
3441
SoundPlayer = new SoundPlayer(Properties.Resources.coin_collect);
3542
SlimeRadiationPoints = 5;
3643
}
37-
public Game(int height,int width,PictureBox mainCharacter,PictureBox mainSlime) {
38-
MainCharacter = new Character(mainCharacter);
39-
MainSlime=new Slime(mainSlime);
40-
SetUpGame();
41-
LoadQuestions();
42-
}
43-
44+
4445
public static int Distance0f(Point x, Point y)
4546
{
4647
return (int)Math.Sqrt(Math.Pow((x.X - y.X), 2) + Math.Pow((x.Y - y.Y), 2));
4748
}
49+
4850
internal void MoveCharacter(int Height,int Width)
4951
{
5052
if (MainCharacter.CanMoveUp)
@@ -66,13 +68,13 @@ internal void MoveCharacter(int Height,int Width)
6668

6769

6870
}
69-
71+
7072
internal void MoveSlime()
7173
{
7274
MainSlime.Move((int)MainCharacter.CharacterSkin.Location.X, (int)MainCharacter.CharacterSkin.Location.Y);
7375

74-
}
75-
76+
}
77+
7678
internal void CheckIfEaten()
7779
{
7880
foreach(Star c in List0fStars)

CYPVP/GameWindow.Designer.cs

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CYPVP/GameWindow.cs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ public partial class GameWindow : Form
1717
{
1818
private Game Game { get; set; }
1919
private int Count { get; set; } = 0;
20-
2120
public static SoundPlayer SlimeRadiationSound { get; set; }
22-
2321
public List<String> List0fTips { get; set; } = new List<string>();
2422

2523
public GameWindow(String Difficulty)
@@ -46,11 +44,12 @@ private void SetUpDiffuculty(String Difficulty)
4644
else
4745
{
4846
Game.Score = -10;
49-
Game.MainSlime.speed = 5;
47+
Game.MainSlime.speed = 6;
5048
Game.SlimeRadiationPoints = 10;
5149
}
5250

5351
}
52+
5453
private void SetUpTimers()
5554
{
5655
StarsSpawn.Interval = 4200;
@@ -69,6 +68,7 @@ private void SetUpTimers()
6968
StarsFade.Start();
7069

7170
}
71+
7272
private void StopGame()
7373
{
7474
StarsSpawn.Stop();
@@ -80,6 +80,7 @@ private void StopGame()
8080
SlimeRadiation.Stop();
8181

8282
}
83+
8384
private void ContinueGame()
8485
{
8586
StarsSpawn.Start();
@@ -90,22 +91,26 @@ private void ContinueGame()
9091
StarsFade.Start();
9192
SlimeRadiation.Start();
9293
}
94+
9395
private void UpdateTime()
9496
{
9597
lb_TimeLeft.Text = $"TIMELEFT: {string.Format("{0:00}:{1:00}", Game.Time / 60, Game.Time % 60)}";
9698

9799
}
100+
98101
private void UpdateScore()
99102
{
100103
lb_Points.Text = $"POINTS: {Game.Score}";
101104
}
105+
102106
private void GiveTip()
103107
{
104108
lb_Heading_text.Text = List0fTips[CYPVP.Random.Next(0,List0fTips.Count)];
105109
}
110+
106111
private void GenerateTips()
107112
{
108-
List0fTips.Add("Cure radiation by eating stars");
113+
List0fTips.Add("Cure radiation by collecting stars");
109114
List0fTips.Add("Collect the stars to increase points!");
110115
List0fTips.Add("Avoid losing 5/10 points by dodging the slime!");
111116
List0fTips.Add("The radiation of the slime can hit you within 8cm");
@@ -275,6 +280,7 @@ private void Movements_Tick(object sender, EventArgs e)
275280
UpdateScore();
276281
RemoveStars();
277282
}
283+
278284
private void SlimeMovements_Tick(object sender, EventArgs e)
279285
{
280286
Game.MoveSlime();
@@ -288,8 +294,6 @@ private void SlimeMovements_Tick(object sender, EventArgs e)
288294

289295
}
290296

291-
292-
293297
private void ScorePoints_Tick(object sender, EventArgs e)
294298
{
295299
if (Game.Time == 40)
@@ -361,6 +365,7 @@ private PictureBox MakeChest()
361365
Chest.Location = new Point(x, y);
362366
return Chest;
363367
}
368+
364369
private PictureBox MakeStar()
365370
{
366371
PictureBox star = new PictureBox();
@@ -371,6 +376,7 @@ private PictureBox MakeStar()
371376
star.Location = new Point(x, y);
372377
return star;
373378
}
379+
374380
private bool Check(PictureBox box)
375381
{
376382
foreach(Star star in Game.List0fStars)
@@ -382,6 +388,7 @@ private bool Check(PictureBox box)
382388
}
383389
return true;
384390
}
391+
385392
private void StarsSpawn_Tick(object sender, EventArgs e)
386393
{
387394
PictureBox NewStar = MakeStar();
@@ -420,23 +427,10 @@ private void SlimeRadiation_Tick(object sender, EventArgs e)
420427

421428
}
422429

423-
private void GameWindow_FormClosing(object sender, FormClosingEventArgs e)
424-
{
425-
SlimeRadiation.Stop();
426-
}
427-
428-
private void GameWindow_FormClosed(object sender, FormClosedEventArgs e)
429-
{
430-
SlimeRadiation.Stop();
431-
432-
}
433-
434430
private void GameWindow_Load(object sender, EventArgs e)
435431
{
436432

437433
}
438-
439-
440434
}
441435
}
442436

CYPVP/bin/Release/CYPVP.exe

7.92 MB
Binary file not shown.

CYPVP/bin/Release/CYPVP.pdb

90 KB
Binary file not shown.
209 KB
Binary file not shown.
209 KB
Binary file not shown.
209 KB
Binary file not shown.
Binary file not shown.
209 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1de747f5c33524be2679761dffcb5818f929ea62
1+
8904a53af1928e5c3fb89eed4913bb8a8b41ed96

CYPVP/obj/Release/CYPVP.csproj.FileListAbsolute.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\bin\Release\CYPVP.pdb
44
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.csproj.AssemblyReference.cache
55
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.csproj.SuggestedBindingRedirects.cache
66
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.CYPVP.resources
7-
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.Help.resources
87
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.Properties.Resources.resources
98
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.csproj.GenerateResource.cache
109
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.csproj.CoreCompileInputs.cache
1110
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.exe
1211
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.pdb
12+
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.ClassMenu.resources
13+
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.EndGame.resources
14+
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.GameWindow.resources
15+
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.HelpWindow.resources
16+
C:\Users\ZIVE\Can-you-pass-Visual-programming\CYPVP\obj\Release\CYPVP.QuestionForm.resources
Binary file not shown.

CYPVP/obj/Release/CYPVP.exe

7.92 MB
Binary file not shown.

CYPVP/obj/Release/CYPVP.pdb

90 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)