equal
deleted
inserted
replaced
1 package ru.alphatech.icfpc.cards; |
1 package ru.alphatech.icfpc.cards; |
2 |
2 |
3 import ru.alphatech.icfpc.cards.api.ICard; |
3 import ru.alphatech.icfpc.cards.api.ICard; |
4 import ru.alphatech.icfpc.cards.api.IPlayer; |
4 import ru.alphatech.icfpc.cards.api.Player; |
5 import ru.alphatech.icfpc.cards.api.IValue; |
5 import ru.alphatech.icfpc.cards.api.IValue; |
6 import ru.alphatech.icfpc.cards.api.Value; |
6 import ru.alphatech.icfpc.cards.api.Value; |
7 |
7 |
8 public class Revive implements ICard |
8 public class Revive implements ICard |
9 { |
9 { |
10 @Override |
10 @Override |
11 public IValue returnValue(IValue value, IPlayer proponent, IPlayer opponent) |
11 public IValue returnValue(IValue value, Player proponent, Player opponent) |
12 { |
12 { |
13 if (value.getClass().equals(Value.class)) |
13 if (value.getClass().equals(Value.class)) |
14 { |
14 { |
15 int i = ((Value)value).getValue(); |
15 int i = ((Value)value).getValue(); |
16 if (proponent.getSlot(i).getVitality() <= 0) |
16 if (proponent.getSlot(i).getVitality() <= 0) |
19 } |
19 } |
20 |
20 |
21 return new ICard() |
21 return new ICard() |
22 { |
22 { |
23 @Override |
23 @Override |
24 public IValue returnValue(IValue value, IPlayer proponent, IPlayer opponent) |
24 public IValue returnValue(IValue value, Player proponent, Player opponent) |
25 { |
25 { |
26 return value; |
26 return value; |
27 } |
27 } |
28 }; |
28 }; |
29 } |
29 } |