2018 Day 24 Work

This commit is contained in:
2019-11-07 21:30:41 -06:00
parent d8e15a5d51
commit 4a7a0e872e
4 changed files with 326 additions and 53 deletions

10
2018/day24/combat.go Normal file
View 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())
}
}