ผลต่างระหว่างรุ่นของ "Prg2/space (applying design patterns)"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) |
Jittat (คุย | มีส่วนร่วม) |
||
แถว 2: | แถว 2: | ||
== Overview == | == Overview == | ||
− | In this assignment, you will apply design patterns to the provided Space Fighter code. | + | In this assignment, you will apply design patterns to the provided Space Fighter code. In this game you can turn the ship with Left and Right keys. You can fire bullets with Spacebar and applying bombs with the Z key. You have 30 bullets at a time and the bomb needs cool-down period (to recharge its power to 100%). |
[[Image:Prg2-space-fighter.png]] | [[Image:Prg2-space-fighter.png]] |
รุ่นแก้ไขเมื่อ 22:29, 24 มีนาคม 2564
- This is part of Programming 2 2563
เนื้อหา
Overview
In this assignment, you will apply design patterns to the provided Space Fighter code. In this game you can turn the ship with Left and Right keys. You can fire bullets with Spacebar and applying bombs with the Z key. You have 30 bullets at a time and the bomb needs cool-down period (to recharge its power to 100%).
Understanding the current code
There are 5 main classes:
- SpaceGame
- Ship (in elements.py)
- Bullet (in elements.py)
- Enemy (in elements.py)
- Bomb
SpaceGame
Ship
Bullet and Enemy
Getting started
This is an individual assignment, but you should still use branches in git for managing your work. You should use the following template as a starter code.
- Template: tk-pacman
Since this is the second time you work on design patterns, the instructions would be less specific and you can use your judgement more freely to improve the code.