Bug 337826 - Computer player's name is not remembered
Summary: Computer player's name is not remembered
Status: RESOLVED FIXED
Alias: None
Product: ktron
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Stas Verberkt
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-07-27 04:54 UTC by Karthik Periagaram
Modified: 2015-04-05 11:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Start and end of a 5-round game (166.18 KB, image/png)
2014-07-27 04:54 UTC, Karthik Periagaram
Details
Change default name from "Player n" to "KSnakeDuel". (296 bytes, patch)
2014-09-12 07:51 UTC, Stephen Michalski
Details
Fix for issue #337826 (1.47 KB, patch)
2014-09-12 21:19 UTC, Stephen Michalski
Details
Fix with indentation respect. (1.40 KB, patch)
2014-09-13 01:04 UTC, Stephen Michalski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karthik Periagaram 2014-07-27 04:54:10 UTC
Created attachment 87973 [details]
Start and end of a 5-round game

The attached montage shows the beginning and end of the first game showing the inconsistent references to the computer player's name. This is set to "Player 2" by default in the configuration settings.

The status bar identifies the computer player as Player 2 at the beginning. However, at the end of the game, the status bar identifies the computer player as KSnakeDuel. The notification message always refers to the computer player as KSnakeDuel.

The expected behavior is that the default name should be set to KSnakeDuel and all messages should use the provided name in the statusbar and notification messages.

The fix is likely to be trivial, so please mark this as a junior job.
Comment 1 Stephen Michalski 2014-09-12 07:51:49 UTC
Created attachment 88671 [details]
Change default name from "Player n" to "KSnakeDuel".
Comment 2 Stephen Michalski 2014-09-12 08:06:07 UTC
Posted patch does not fix issue. I posted the patch without testing all possible/feasible cases.
Comment 3 Stephen Michalski 2014-09-12 21:19:01 UTC
Created attachment 88683 [details]
Fix for issue #337826

Calls to loadSettings for Tron and KTron implementations were out of order, causing old values to be displayed until a paintEvent was triggered by pressing movement keys to start a new game. The default value for the second player has also been changed to "KSnakeDuel".
Comment 4 Stephen Michalski 2014-09-13 01:04:35 UTC
Created attachment 88688 [details]
Fix with indentation respect.

Fix with indentation respect.