From 7167b4341ef290d56fb96e2af10883a4b925d83b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 26 Mar 2026 19:27:18 +0100 Subject: I found my old code! --- .../0.3/0.3.2/src/PannelloCartePassate.java | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 JBriscola/all_versions/0.3/0.3.2/src/PannelloCartePassate.java (limited to 'JBriscola/all_versions/0.3/0.3.2/src/PannelloCartePassate.java') diff --git a/JBriscola/all_versions/0.3/0.3.2/src/PannelloCartePassate.java b/JBriscola/all_versions/0.3/0.3.2/src/PannelloCartePassate.java new file mode 100755 index 0000000..fef9666 --- /dev/null +++ b/JBriscola/all_versions/0.3/0.3.2/src/PannelloCartePassate.java @@ -0,0 +1,49 @@ +/* +Copyright 2009-2010 Sebastiano Tronto + +This file is part of JBriscola. + + JBriscola is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + JBriscola is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with JBriscola; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +import javax.swing.*; +import java.awt.*; + +public class PannelloCartePassate extends JPanel { + + public static int posto[][] = new int[40][2]; + + public static Main main; + + public PannelloCartePassate() { } + + public void paint( Graphics g ) { + + super.paint( g ); + + for( int i = 0; i < 40; i++ ) { + posto[i][0] = ( i % 10 ) * 70; + posto[i][1] = ( i / 10 ) * 136; + } + + for ( int i = 0; i < main.mano*2; i++ ) + if ( main.frame.arrayCartePassate[i] != null ) + main.frame.arrayCartePassate[i].paintIcon( this, g, posto[i][0], posto[i][1] ); + + + } + +} -- cgit v1.3