CS 12 MP Questions – Answers

Question.

1. What are the dimensions of the sigil? Will it be used in-game? Also, can we use an actual motto from the series? Our group’s house is Lannister, so can we use their motto: “Hear me Roar” or do we have to modify it? Also, can our heroBot sprite resemble an actual character from Game of Thrones? We have created it ourselves but it is inspired by one of the characters from the show.

2. Does our heroBot have to implement both the Attacker and Attackable interface? If so,
a.) Do we have to implement the attack() and attacked(Attacker) methods ourselves? (unimplemented methods warning from Eclipse)

b.) If our hero is called ‘HeroBot’, do we call the method attacked(Attacker) by using HeroBot.attacked(enemyBot)? or is it enemyBot.attacked(HeroBot);

c.) What does it mean by “attack() method is automatically called within the game through the Attackable.attacked() method”
Does this mean that we have to put the Attackable.attacked() method inside the action() method?

Answer:

1. No specific size. It will not be used in-game just as identity. Yes, not required to modify. Yes, as long as you did more than 50% of it.

2. Attack is for you to attack a hero/creep. Attackable gives you the hero/creep that is attacking you during a class. Here’s a basic implementation.

public void clashed(Attackable atckbl)

  {

    atckbl.attacked(getAttacker());

  }

2.a. you have to because if you don’t attack, then your hero bot is useless. Aslo, attackable (as stated in the docs) must be implemented as part of interaction with other hero/creep.

2.b. every hero is called hero. Herobot and Enemybot are just names we give them. You can use it as variable.

2.3. no need to specifically call attack().. as is is done by the Attackable.attacked(). Nope, it happens during a clash. So it should be in clashed().