import 'package:test/test.dart';
import 'package:wolf_3d_dart/wolf_3d_data_types.dart';
import 'package:wolf_3d_dart/wolf_3d_entities.dart';

void main() {
  group('Scoring ownership', () {
    test('treasure collectibles expose score values', () {
      final cross = TreasureCollectible(x: 1, y: 1, mapId: MapObject.cross);
      final chalice = TreasureCollectible(
        x: 1,
        y: 1,
        mapId: MapObject.chalice,
      );
      final chest = TreasureCollectible(x: 1, y: 1, mapId: MapObject.chest);
      final crown = TreasureCollectible(x: 1, y: 1, mapId: MapObject.crown);
      final extraLife = TreasureCollectible(
        x: 1,
        y: 1,
        mapId: MapObject.extraLife,
      );

      expect(cross.scoreValue, 100);
      expect(chalice.scoreValue, 500);
      expect(chest.scoreValue, 1000);
      expect(crown.scoreValue, 5000);
      expect(extraLife.scoreValue, 0);
    });

    test('enemy instances expose score values from enemy type metadata', () {
      final guard = Guard(x: 1, y: 1, angle: 0, mapId: MapObject.guardStart);
      final dog = Dog(x: 1, y: 1, angle: 0, mapId: MapObject.dogStart);
      final officer = Officer(
        x: 1,
        y: 1,
        angle: 0,
        mapId: MapObject.officerStart,
      );
      final ss = SS(x: 1, y: 1, angle: 0, mapId: MapObject.ssStart);
      final mutant = Mutant(
        x: 1,
        y: 1,
        angle: 0,
        mapId: MapObject.mutantStart,
      );

      expect(guard.scoreValue, 100);
      expect(dog.scoreValue, 200);
      expect(officer.scoreValue, 400);
      expect(ss.scoreValue, 500);
      expect(mutant.scoreValue, 700);
    });
  });
}
