From 2851c4497f813789a38269cf4ea63e606a6612ed Mon Sep 17 00:00:00 2001 From: Amir Daouadi Date: Tue, 18 Apr 2023 15:13:06 +0200 Subject: [PATCH] ajout mineur --- src/Accueil.class | Bin 0 -> 1966 bytes src/Boutons.class | Bin 0 -> 4232 bytes src/Boutons.java | 2 +- src/Fenetre.class | Bin 0 -> 650 bytes src/GridPanel$1.class | Bin 0 -> 1208 bytes src/GridPanel$2.class | Bin 0 -> 1009 bytes src/GridPanel$3.class | Bin 0 -> 1002 bytes src/GridPanel$4.class | Bin 0 -> 1004 bytes src/GridPanel$5.class | Bin 0 -> 534 bytes src/GridPanel$6.class | Bin 0 -> 534 bytes src/GridPanel.class | Bin 0 -> 4301 bytes src/GridPanel.java | 38 +++++++++++++++----------------------- 12 files changed, 16 insertions(+), 24 deletions(-) create mode 100644 src/Accueil.class create mode 100644 src/Boutons.class create mode 100644 src/Fenetre.class create mode 100644 src/GridPanel$1.class create mode 100644 src/GridPanel$2.class create mode 100644 src/GridPanel$3.class create mode 100644 src/GridPanel$4.class create mode 100644 src/GridPanel$5.class create mode 100644 src/GridPanel$6.class create mode 100644 src/GridPanel.class diff --git a/src/Accueil.class b/src/Accueil.class new file mode 100644 index 0000000000000000000000000000000000000000..dd236161ed0685ba74e1243c5ad0732503be1e2e GIT binary patch literal 1966 zcmZuyTUQ%Z6#j->CLISzLII(crq#BA(56=L0<{)Wp`qL=6%6&#Npc87lbLiffl@EE z-hP6QKKkT~FNw>nrH{H?`j=dOXC?`;%f(`!oV~w&-)GOC|NQbRfLHOYhH=bl2w_ge zH4OpGs(4G@$qeASink-Up<-S`1PdxM8g$&0mv>YwMzEw|5Vzz#t72Kh5N^xMii%YY zBUqDUU6KtIcT~Kq;gm#-V^fm5lDwy4OGCnsVmpHOrT1I}J2HTK67hkG4FE~ru3t?4P2I9bfj@b#|*A0P#1j%{MCl&5ZF}^m&ixy+95+pFRvJRLGNcW zd$w6KYc=sWabPp9gnLvKiK0l99J4GPjrXc;O681g)m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1FdyTd=6q4%0_2G&wQ@Et9a&hJT1POHTFCs|%R`4&Fy=)q7G=FJ( z72T-SR~2yCHR7p&%a0>^TwrV0Iw}RW<5;e3YY!9HU68daxK(}FhkYEKyBSnI&esy2 zceVnq)H;I$0ep6)ivymZcy8iq;YIx%w&N^s9isQCw>+dP5Wz~uN&{jfy&0=1y%uq- zLp#>vdTcb3^J`@b9>yiK-A2oo<1uPHNhY4cHayK;o@EZ6 z!$321&*>(#p^as1Ch|8qU1{rAx-OS1@mfC>vrl{e^vm bY(9^_;m@dt#qkoZ*p$iQ2LAmg7uo*+P#lyN literal 0 HcmV?d00001 diff --git a/src/Boutons.java b/src/Boutons.java index 69aeb4c..b831f2b 100644 --- a/src/Boutons.java +++ b/src/Boutons.java @@ -87,4 +87,4 @@ public class Boutons extends JPanel { public JButton getImporterGrille() { return importerGrille; } -} \ No newline at end of file +} diff --git a/src/Fenetre.class b/src/Fenetre.class new file mode 100644 index 0000000000000000000000000000000000000000..a2c928b5af08a89c6a7d05fa35bfc8a51a8a604f GIT binary patch literal 650 zcmY*X+iuf95Ix&moVc4_LerK@3oVyA?!|z3D?&o4A_WDINQA@#53V~T3y!yPHVxvh zkWh+1;sf|7#H_KR^5C=D*)wy_%=q`8AHM)R!Q%?nTr8sDVjUY6HXU5AqJ$e3Zn_M& zT-2~-VcWrNd){%dBT#;-5@ntV6ujnJfnrOak-&0SCG=`CI;FH9p2i$;dwP;a)K>N) z+mw(=>F8s45ehiZqi8}ZmRQ2BgS!&l+ z4sa-Ogdk^s4#rcJ41yQ!G#rt{Lp)-QTvDLnb+ejr$ef-@nR;xkugsPDTF0N15m+6N zIiU~XBsTNdn%Df7Z$0JFV}Tk|dr?Z1^wbw_as4W7Zk>sxsX8-50ny>%4M`1#EL8G3 z9qYjvbCoQABX{{<=b6t2bGkYT4Uggt#e7~+UkhB#Xz9_pPAD;1#wKUvZM0%Nrq}0` zX6d{yk9D!b>s;ht0bpM|(`CjLzP(2g1wIe`y12x`cNAtQc7LMuZvPv~{5hAXyz~!d qsQO|C*Duc?zh-4t8MomuIw+&U0#$6m#V!l&!S1ZaB6WUWz_q_Uj*<-k literal 0 HcmV?d00001 diff --git a/src/GridPanel$1.class b/src/GridPanel$1.class new file mode 100644 index 0000000000000000000000000000000000000000..3410bec1a9edb359237de4320ae1c740c628a480 GIT binary patch literal 1208 zcmZuxSyR(c6#j0v*btzAsK_Q#po`EF7DX0?QlQWxP8ksyA3}QvA|+wkfIj;dd_v#l zSw?}u8GnF3N<256Hf){g$#<6foh>(i|DFEJQowORRGYQ5+)hT@v(MZ0j7fMdfzr!abHAA5bGjg|s}?pO7%6ws$Q8_zZfs?^ zwQc4lOeko^q=F{gl`y7Y3NIAA#I%ALffATiki;BuE11WEf|L-8;>Z$aDMhu^6;n4X z!IoB#!Lou^;_M2RX+qUHf`im<$}o5_QP4^yUSepiGF)nQIUlBtqofv@kg6@Y$LYstk#^93B!7hl^F}a0F eLZ=+;f}6%Ha(2-;LF4JBOiu~PG_(eK((gZEvi~Xo literal 0 HcmV?d00001 diff --git a/src/GridPanel$2.class b/src/GridPanel$2.class new file mode 100644 index 0000000000000000000000000000000000000000..e056613124270b4714c81df9210001edf37b551e GIT binary patch literal 1009 zcmZuwT~E_c7=8|`l$8z!hysdibKo|Fjv)@@D}cjjHYGqbA@QPgM<|X{)1Co;MgIWT zCW^!he*vMu{qTKtF$X|04NC57izu-KNg zo%a>{Ll{Gc6*40>#+Fz29lq|W$X%DrCRIGTswAA67r0`t!sWhKB}WrIm@?6gxQPO$ zO{&a{iN`2XW))(bc*+BE&@pRb4o^(XqiA9Qizb$o(an;m5l7!zIq>R|`-w{356JiO z>U4p@d@cm{*J^eUa8ky@>}s~yvtI2Ua7Qu>Uz>2*4J0Q|hUjHHhM{Y1!{RVRGO9j? z?Ks3cJ(Z`L{M(A1RxNSsZf(>~wnbf3&Z$;)HtfrZ6&zCutrx3xDLp}5?^BHa6Eo-m zm)rb=vg>a)G)#F*`s5w9@q*^8y2&8(l29{2BcNq=TJxC8=aHa!je*hui^o;NXpGzF z>p?F``v|4ztRzNm{3}@Q8`?h8iF!n9JMF+Ut^K&wwEx+(cXMCJoW65JK0((`p+(N2 zy=jU*BGW)OdfU&SH*iPf4ABNO6gKIb{04pRB!JRPVT@2H%(Qi6}hlC8u(4?K7 EzlBxXvj6}9 literal 0 HcmV?d00001 diff --git a/src/GridPanel$3.class b/src/GridPanel$3.class new file mode 100644 index 0000000000000000000000000000000000000000..14356fb1c378df23f525f6c701022d742ecd15d1 GIT binary patch literal 1002 zcmZuw(M}UV6g@-NE?u@zKon4<#e!`Swt@->ViXEOT5KrMq=^s9c7(-c*X&M#U(p}n z*+h}}V0`wY)H~Z!s$r9vIdkXSJLldz`|J1j9{?WWSqwUo8sZq$a0e+ljmhb5C(;_m zF(EhiB+5vX?L3pO(+p9uZwKi-LsxO#w`*n7<<26Rmu%M-%M9I_HhcCpgRU>=!OWCxHM^_bG%kcu+-79gi@72grM=u`e=s`lq z3}$tz%p)C-F-Mt|NO5wN2jrk)UdIBS=vc&@jwL+Ru`EgPvSV7@Pi}g3UiZnVb!U2( zLEms)?yopz5b%H@5vJvs?w;{#_kdf1VdTn8i*_J5c{0RW@fe1$R6AqyMO_HbrFQpAMgN%@)PRc} zenQy|G&>olToFEbhyA;dIVW$@h+c5zW1!wEnQD6;3;8^f^iboVbifh`*(rLz9W;8; zN7jBqW3-nREjRfUEcXo^pJ~T%o#rU5z$(oHxY6YQZ1U~g7oyWRN8}S!@^ zv5gYmVhj5y(>X8%Wn0DIAL*=ONX4*R2iZ&t5!?zx-o^;63jLp>xKBu<40T%R`wOmi B*{c8m literal 0 HcmV?d00001 diff --git a/src/GridPanel$4.class b/src/GridPanel$4.class new file mode 100644 index 0000000000000000000000000000000000000000..dbddc37edcbabb414f78902a5a239546d6ffbee4 GIT binary patch literal 1004 zcmZuwVNVl55PeHejvfaT5Cs$|SgiZ&EQYt$^)6%Natx!VGNMgIVw zO%#bAjGz5c>g-WUH8i=|x3h0%-^^@({r>&~zzpt2VIppz1H%TcU__ZwWv;d%VPFj7 zYI9AYq(Z4Sq;*W_nA9=F&?>i_Adz8cFFf>}N|C#wnkVG(<5W13eJj|b?pcrT*QE4Z8hEc#^q-qS4}@G3 z`&3jGd6$Pf6M-NkJv2C6qIcDB*Qn#0!kzB_>fu4zI9` z*I30HvTv~kPUpY?v{fDbe^juJ0Ud*C?Pt>?h~QF~@-l{K)#x8OjO&C9s?emBet!Y3 CquRy* literal 0 HcmV?d00001 diff --git a/src/GridPanel$5.class b/src/GridPanel$5.class new file mode 100644 index 0000000000000000000000000000000000000000..4089a33c4bef4ca5a47dd04c8dcb60a3df672ee2 GIT binary patch literal 534 zcmZuu$w~u36s*qTB;#ap-;GEPF@o`+CqU!PpAFpo!wy=^$0+Tk9n6fdBX$vzJ<}A!JWCq+Tb^_@(xDp=2 zX#Mb~*3#zxD16- zy~_u@!f$j%4205^{RmPs^^Os{SH5du!NDSy z99T#>NMqSS0n6ll$SiI%I7do}pz8536d^-C^5AjRshqaDqOBR0{dnM1 zuRnp6Ul4nsj%-sT7R6hN8DzilMal-BDnEifBmRrFqxl`(a*sH2goz=KG0F-0>pawwSx5^UKBw}6`^XO;>A{ z`SHkRcy=@VM$!PFr2k)(lJk+N#S?3t}>)hkCSc zk4wccUAp*MCK77ufLui@#7kxoD-hR&)7Yd3Pl6s0ET1<%=^tWr(y(bdO4Ta$W@4Au z@4?ECh}}|0wkZ;e;tRzLvfub3WrI(Z@4y}q|3%x;{FQEbLmWB6#E{1r7vGlpN0>J z@{u4O)$u_Cv+-aMAJXw*1J{UtElwKv2tF#}V}ks+^iE0d6SBo)75F4RCE{^Wd|Ku{ zqvNwdJYk>}$3;9T;8CW9ToxzYU>ZLdwL|VqfGWdKDUl8O|A~HI@sN+ip!s106 zo)+Qx3AKmt=CW)PB=-=a=a~8JY|>kA4-L_T6Y+#gv$fl|M|N9#tY&Mk*Q_R&5o||eUPmG- zYqx2r9*kSP_WDH1PPzW9p=P@MLB(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Sy)>Auu7&C?t;Nn0Ab)tJs8uhYoAdQ(@eb6igD&b^F2D1fpbrw`I z0-B>h8bMkH*9hpfS&$~6CspVyN*6OICo)_WF!)XbfrV*2{hVS4G zOy%V`4K}7D!FBuj2EL!|LmWRs(jVi)GmV8fivfKu50*Rs~!{g?5RCO0zQ>N_5zqDk+#E+}3pLx`6TvC?ngvkg}W~<(Qn~ zKcS{!ye`kl@;oQ=nivfsr8SL)CLzk`7vdD%hIGj!XR&E!h>N1uNJe zyP|P~(;egr3{4q!lfj$GTAcrl3}89?Va~Oa^-d)D+VNl^MQxHZ`*AA{;2>_n5%!Pa zHk`oiIEg#>csYpkID{8*C;pAQ6n`^eT!gL(YZuT$GA<&>Uj0S>kHDs-h4~cYUg|*N zQU5?=wXgSw zZ)hq_V`TN?>IC1L`{&9iD!MSW6OMGbzn+7o;O*pCd&yOfKvooQ4E^EU=e8Wi6U0t zR@ACq%&JSi{J7R5!1Do?v!-n MZC$pNqsgED0gVgjmjD0& literal 0 HcmV?d00001 diff --git a/src/GridPanel.java b/src/GridPanel.java index 2ef76da..ff9ad4a 100644 --- a/src/GridPanel.java +++ b/src/GridPanel.java @@ -4,8 +4,6 @@ import java.util.Random; import java.awt.event.*; public class GridPanel extends JPanel { - private static final long serialVersionUID = 1L; - private int gridSize = 10; private int cellSize = 50; private Color[][] gridColors; @@ -21,7 +19,7 @@ public class GridPanel extends JPanel { public GridPanel() { setPreferredSize(new Dimension(gridSize * cellSize, gridSize * cellSize)); setBackground(Color.WHITE); - + gridColors = new Color[gridSize][gridSize]; Random rand = new Random(); for (int i = 0; i < gridSize; i++) { @@ -29,7 +27,8 @@ public class GridPanel extends JPanel { gridColors[i][j] = rand.nextBoolean() ? Color.BLACK : Color.WHITE; } } - + + addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { int row = e.getY() / cellSize; @@ -46,13 +45,13 @@ public class GridPanel extends JPanel { } } }); - + editButton = new JButton("Enlever/Ajouter Murs"); editButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { editMode = !editMode; if (editMode) { - editButton.setText("Mode Dessin"); + editButton.setText("Mode Auditeur"); placeJoueurButton.setEnabled(false); placeTButton.setEnabled(false); } else { @@ -63,41 +62,42 @@ public class GridPanel extends JPanel { } }); add(editButton); - - placeJoueurButton = new JButton("Placer Joueur"); + + placeJoueurButton = new JButton("Placer Thésée"); placeJoueurButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { placeJoueurMode = !placeJoueurMode; if (placeJoueurMode) { - placeJoueurButton.setText("Mode Dessin"); + placeJoueurButton.setText("Mode Auditeur"); editButton.setEnabled(false); placeTButton.setEnabled(false); } else { - placeJoueurButton.setText("Placer Joueur"); + placeJoueurButton.setText("Placer Thésée"); editButton.setEnabled(true); placeTButton.setEnabled(true); } } }); add(placeJoueurButton); - - placeTButton = new JButton("Placer Lettre T"); + + placeTButton = new JButton("Placer Sortie"); placeTButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { placeTMode = !placeTMode; if (placeTMode) { - placeTButton.setText("Mode Dessin"); + placeTButton.setText("Mode Auditeur"); editButton.setEnabled(false); placeJoueurButton.setEnabled(false); } else { - placeTButton.setText("Placer Lettre T"); + placeTButton.setText("Placer Sortie"); editButton.setEnabled(true); placeJoueurButton.setEnabled(true); } } }); - add(placeTButton); + add(placeTButton); } + public void paintComponent(Graphics g) { super.paintComponent(g); @@ -144,13 +144,5 @@ public static void main(String[] args) { frame.getContentPane().add(gridPanel.getComponents()[0], BorderLayout.NORTH); frame.pack(); frame.setVisible(true); - - Timer timer = new Timer(100, new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - gridPanel.repaint(); - } - }); - timer.start(); } }