2018 Day 24 Work
This commit is contained in:
10
2018/day24/combat.go
Normal file
10
2018/day24/combat.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
// All Battle Logic is in here
|
||||
func Battle(army1, army2 []Army) {
|
||||
allCombatants = append(army1, army2...)
|
||||
sort.Sort(ByPower(allCombatants))
|
||||
for _, v := range allCombatants {
|
||||
fmt.Print("%d %d %d (%d)\n", v.tp, v.units, v.hp, v.Power())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user