Bug 648 - Player time delay are the same as the AI.
Summary: Player time delay are the same as the AI.
Status: RESOLVED FIXED
Alias: None
Product: CS3343 2021/22 Group16 Greedy Snake
Classification: Unclassified
Component: Action Package (show other bugs)
Version: Ver 3.1
Hardware: PC Windows
: --- enhancement
Assignee: Baron Qu
URL:
Depends on:
Blocks:
 
Reported: 2021-12-05 17:52 HKT by Baron Qu
Modified: 2021-12-05 17:59 HKT (History)
1 user (show)

See Also:


Attachments
Code implementation (94.70 KB, image/png)
2021-12-05 17:59 HKT, Baron Qu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Baron Qu 2021-12-05 17:52:42 HKT
When starting the game, choose 1 key, the player snake delay just the same as the AI snake delay, therefore, the player snake would move very fast, it's very hard to operate the snake.
Comment 1 Baron Qu 2021-12-05 17:54:27 HKT
For this problem, we use the timer's built-in function setDelay() to reset the time delay after we choose the game mode.
Comment 2 Baron Qu 2021-12-05 17:59:47 HKT
Created attachment 102 [details]
Code implementation