From 0aabfbde7cc5d2896661394063845605261a4677 Mon Sep 17 00:00:00 2001 From: xxsoca Date: Sun, 25 Jun 2023 13:23:03 +0200 Subject: [PATCH] print info after turn and spielfeld --- daten.pl | 25 +++++++++++++------------ gui.pl | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/daten.pl b/daten.pl index bd9ba96..dbf3650 100644 --- a/daten.pl +++ b/daten.pl @@ -48,7 +48,7 @@ player_color(2, white). % Erschafft ein festes Spielfeld init_feld1 :- % feld(X, Y, Type) - assert( feld(0, 0, 1) ), + assert( feld(0, 0, 2) ), assert( feld(0, 1, 2) ), assert( feld(0, 2, 1) ), assert( feld(0, 3, 1) ), @@ -57,26 +57,26 @@ init_feld1 :- assert( feld(1, 0, 1) ), assert( feld(1, 1, 1) ), assert( feld(1, 2, 1) ), - assert( feld(1, 3, 1) ), - assert( feld(1, 4, 1) ), + assert( feld(1, 3, 3) ), + assert( feld(1, 4, 3) ), assert( feld(2, 0, 1) ), - assert( feld(2, 1, 1) ), + assert( feld(2, 1, 2) ), assert( feld(2, 2, 3) ), assert( feld(2, 3, 3) ), assert( feld(2, 4, 1) ), assert( feld(3, 0, 1) ), - assert( feld(3, 1, 1) ), - assert( feld(3, 2, 1) ), - assert( feld(3, 3, 3) ), + assert( feld(3, 1, 3) ), + assert( feld(3, 2, 2) ), + assert( feld(3, 3, 2) ), assert( feld(3, 4, 1) ), - assert( feld(4, 0, 1) ), - assert( feld(4, 1, 1) ), + assert( feld(4, 0, 3) ), + assert( feld(4, 1, 3) ), assert( feld(4, 2, 1) ), assert( feld(4, 3, 1) ), - assert( feld(4, 4, 3) ). + assert( feld(4, 4, 1) ). % Setzt das Spielfeld sowie die zugewiesenen einheiten zurück @@ -141,9 +141,9 @@ print_info(Type,X,Y,HP) :- print_unit(X,Y) :- write("X/Y: "), - write(X), + write(Y), write(":"), - write(Y). + write(X). print_player(Player) :- write("## Player "), @@ -159,6 +159,7 @@ print_player(Player) :- write(T). print_player1 :- + nl, print_player(1). print_player2 :- diff --git a/gui.pl b/gui.pl index d9f9afb..a354783 100644 --- a/gui.pl +++ b/gui.pl @@ -309,11 +309,13 @@ process_move_unit(FromX, FromY, ToX, ToY, Controls) :- ), update_controls, + info_all, spielfeld. process_end_turn :- end_turn, update_controls, + info_all, spielfeld. game_over_gui(Winner) :-