-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.go
More file actions
26 lines (24 loc) · 832 Bytes
/
Copy pathtask.go
File metadata and controls
26 lines (24 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
//func (r *Executor) fightMonsterLoop(ctx context.Context, monsterName string, quantity int) error {
// numKilled := 0
// for numKilled < quantity {
// result, err := r.fightMonster(ctx, monsterName)
// if err != nil {
// return fmt.Errorf("killing monster: %w", err)
// }
// if result.Result == client.Win {
// numKilled++
// }
// }
//
// return nil
//}
// if fight.Result == client.Lose {
// r.reportAction("Fight lost!")
// } else if len(fight.ResourcesForItem) > 0 && fight.Gold > 0 {
// r.reportAction("%s dropped %v and %d gold", monsterName, fight.ResourcesForItem, fight.Gold)
// } else if len(fight.ResourcesForItem) > 0 {
// r.reportAction("%s dropped %v", monsterName, fight.ResourcesForItem)
// } else if fight.Gold > 0 {
// r.reportAction("%s dropped %d gold", monsterName, fight.Gold)
// }