SibylLab / Program-Wars

A web-based educational card game for teaching basic concepts of computer programming and cybersecurity
https://program-wars.firebaseapp.com
GNU General Public License v3.0
16 stars 4 forks source link

The bonuses do not properly reflect the new cards being added for malware #596

Closed strinsberg closed 4 years ago

strinsberg commented 4 years ago

Gameplay Problem The bonuses are not correct anymore for added cards. They need to be updated and tested again.

Screenshots Here I have only the antivirus and got Defensive bonus which is supposed to be fore having both antivirus and firewall (most likely due to the way protection works now) Screenshot from 2020-06-20 20-15-14

Here both players are getting the clean bonus but they have malware Screenshot from 2020-06-22 10-35-32

strinsberg commented 4 years ago

This will actually require most of the changes to the functions that compute bonuses in the src/classes/game/Objectives.js file. Some small changes to names of bonuses may be needed in the src/components/modals/WinnersModal.vue for the visual side of things.

Complete Program needs to become Nested Loops and it should award 2 points for each stack that the player has where stack.isComplete() returns true. The scoring change can be made by adding something like the following to Objectives.js where complete bonus is calculated stacks.filter(s => s.playerId === player.id && s.isComplete() the number of stacks that are returned can be multiplied by 2 and added to the score.

Defensive Programmer needs to be updated just return true if the player has 'ANTIVIRUS' as it is no longer possible to have all safeties on you at once. Antivirus is the one that covers everything. Might even what to remove this bonus since we give bonuses for playing safeties as well.

Clean System needs to be updated in the Objectives.js class to check for all types of malware now that VIRUS is not an effect. This will require looking at all of a players stacks to ensure none have 'VIRUS' cards on top. It will also require inspecting a players hand to ensure that they do not have any cards that isMimic is true for.

maimoona-bashir commented 4 years ago

cleanSystem

strinsberg commented 4 years ago

we have fixed this up

Screenshot from 2020-06-26 15-28-06