small changes

This commit is contained in:
Alexandre 2024-12-12 07:55:07 +01:00
parent fff0250bb4
commit e013ffc430
8 changed files with 43 additions and 27 deletions

BIN
again

Binary file not shown.

BIN
again.cmi

Binary file not shown.

BIN
again.cmx

Binary file not shown.

View File

@ -1028,7 +1028,7 @@ let move_land (gd : game_data) (dgs : danger_map) (gn : int array array) =
let is_good = ref false in
let result_bomb = bfs_for_land ~return_ok:is_good true gd dgs cxi cyi xmax ymax gd.dt 1 80 in
if is_safe && !is_good then begin
if is_safe && gd.players.(pid).bomb_to_place > 0 && !is_good then begin
if logg then Printf.fprintf stderr "kaboom\n" ;
action := 1 ;
result_bomb

BIN
again.o

Binary file not shown.

View File

@ -1,25 +1,31 @@
192.1625000000009
1
211.3700000000007
2
13 21
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 3 3 3 3 3 3 4 3 3 3 3 3 3 3 4 3 3 5 5 1
1 3 1 3 1 3 1 4 1 0 1 3 1 3 1 4 1 5 1 5 1
1 3 3 3 4 6 4 4 4 5 5 4 3 4 4 4 4 4 4 4 1
1 3 1 3 1 6 1 4 1 5 1 4 1 4 1 4 1 4 1 4 1
1 3 3 6 6 6 4 6 4 5 5 5 5 5 5 5 5 4 5 4 1
1 3 1 3 1 6 1 6 1 5 1 4 1 4 1 4 1 4 1 4 1
1 3 3 6 6 5 5 5 5 5 5 5 5 5 3 4 4 4 4 4 1
1 6 1 3 1 3 1 6 1 5 1 4 1 4 1 4 1 4 1 4 1
1 6 3 3 3 6 6 6 4 5 4 6 4 6 4 6 4 4 4 4 1
1 6 1 3 1 3 1 6 1 5 1 6 1 6 1 6 1 4 1 4 1
1 6 6 3 3 6 6 6 6 5 6 6 6 6 6 4 4 4 4 4 1
1 3 4 5 4 4 4 4 0 4 0 0 0 6 6 6 6 6 6 6 1
1 3 1 5 1 6 1 5 1 3 1 6 1 6 1 5 1 6 1 5 1
1 5 5 5 5 6 5 3 5 3 4 6 3 4 3 5 3 3 4 4 1
1 3 1 5 1 6 1 6 1 3 1 4 1 4 1 5 1 6 1 5 1
1 4 6 5 6 6 6 6 6 3 6 4 4 4 4 4 5 6 6 6 1
1 0 1 5 1 6 1 6 1 3 1 4 1 4 1 5 1 6 1 5 1
1 4 4 5 3 3 3 6 3 3 3 4 3 4 3 4 6 5 4 4 1
1 6 1 5 1 6 1 6 1 3 1 4 1 4 1 5 1 5 1 4 1
1 3 6 4 6 6 4 4 4 4 4 4 4 4 4 4 4 5 4 4 1
1 6 1 4 1 6 1 6 1 3 1 4 1 4 1 5 1 4 1 4 1
1 3 3 3 3 3 3 6 4 3 4 4 4 4 4 4 4 4 4 4 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
8
5 8 4 211.4600000000004
7 3 2 212.01000000000067
6 9 4 213.0800000000004
3 7 5 213.21000000000043
10 3 2 214.44000000000068
7 10 4 214.70000000000041
11 10 5 214.93000000000043
11 4 2 216.06000000000068
4
7 16 3 192.41370000000083
6 15 3 193.72590000000085
5 14 3 195.03810000000087
10 7 4 195.5400000000004
2
7 12 1 4 1 3 2 3
11 5 2 2 0 4 1 3
1 10 0 2 0 5 1 3
11 11 1 2 1 5 3 2
11 5 2 2 3 2 3 1
7 13 3 2 0 4 1 2
0

View File

@ -42,6 +42,7 @@ J_BOMBESRESTANTES = 6
J_DASHSRESTANTS = 7
J_PIEGESRESTANTS = 8
J_TOURSDASH = 9
J_PENALITE = 10
A_BOMBE = 1
A_DASH = 2
@ -57,12 +58,19 @@ PU_LIGNE = 0
PU_COLONNE = 1
PU_NATURE = 2
P_LIGNE = 0
P_COLONNE = 1
P_JOUEUR = 2
from random import randrange
from copy import deepcopy
import subprocess
from tkinter import *
import os
from playsound import playsound
try:
from playsound import playsound
except ModuleNotFoundError:
playsound = lambda _:()
from threading import Thread
import sys
@ -90,8 +98,8 @@ def cree_plateau_initial(lignes, colonnes, nombreDeTrous):
for i in range(nombreDeTrous):
i,j=0,0
while plateau[i][j] != PLATEAU_BOIS:
i=randrange(lignes)
j=randrange(colonnes)
i=1+randrange(lignes)
j=1+randrange(colonnes)
plateau[i][j] = PLATEAU_VIDE
return plateau
@ -349,7 +357,9 @@ def casse(plateau, powerups, i,j):
return
def play_planks():
try:
playsound('./audio/wood.mp3')
except:
return
def execute_evenement(evenements, evenement, plateau, plateauCouleur, bombes, joueurs, powerups, pieges):

View File

@ -1 +1 @@
3 1
0 0