Automated Spades Program in Java

Obioku Obotette
14 min readOct 22, 2020

* To change this license header, choose License Headers in Project
* To change this template file, choose Tools | Templates
* and open the template in the editor.
package spadesprogram;
//import Java libraries
import java.awt.BorderLayout;
import static java.awt.Frame.MAXIMIZED_BOTH;
import java.awt.Graphics;
import java.util.Arrays;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import static javax.swing.JFrame.EXIT_ON_CLOSE;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import spadesprogram.Card.*;
* @author ObObotette0
//Spades program accesses the Card class
public class SpadesProgram extends Card {
//array to hold deck of Cards
public static Card[] deckOfCards = new Card[52];
//array containing the four cards of the book
public static Card[] current = new Card[4];
public static Card blank = new Card();
//Object for each player
public Player p1 = new Player();
public Player p2 = new Player();
public Player p3 = new Player();
public Player p4 = new Player();
//Calculate team’s points
public static int team1;
public static int team2;
//vvariable for which player won the hand
public static int winHand = 0;
//variables to help retrieve images by file
public static String cardName;
public static File getImage;
//public static Card[] more;
public static final int NumCards = 52;
//index for creating deck
public static int c = 0;

Obioku Obotette

Trying to introduce myself in a new forum with hopeful expectations!