Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddingFiles #334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added MemoryGame/Lib/commons-lang-2.6.jar
Binary file not shown.
Binary file added MemoryGame/Lib/commons-logging-1.1.1.jar
Binary file not shown.
Binary file added MemoryGame/Lib/hsqldb.jar
Binary file not shown.
Binary file added MemoryGame/Lib/jackcess-2.0.6.jar
Binary file not shown.
Binary file added MemoryGame/Lib/ucanaccess-2.0.9.2.jar
Binary file not shown.
Binary file added MemoryGame/Rankings.accdb
Binary file not shown.
32 changes: 32 additions & 0 deletions MemoryGame/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Objective
Develop a GUI based Java desktop application for the flip-flop memory game, also known as the concentration game. The application should allow players to test and improve their memory skills by finding matching pairs of cards. The game should utilize multi-threading to enhance performance, and it should incorporate file handling and database functionality based on your own business logic and project needs.

## Requirements
### User Interface
- Design and implement a graphical user interface (GUI) for the game.
- Display a grid of cards/tiles, initially facedown.
- Each card/tile should have a distinct design or image on its face.
- Provide a score or timer display to track the player's progress.

### Game Logic
- The game should have a set of cards/tiles with matching pairs.
- Randomly shuffle the cards/tiles before the game starts.
- Implement the flip functionality, allowing the player to click on a card/tile to flip it over and reveal its face.
- Implement the logic to check if the two flipped cards/tiles match or not.
- If the cards/tiles match, keep them face up and allow the player to continue their turn.
- If the cards/tiles do not match, flip them back face down after a short delay.
- Track the player's score or time taken to complete the game.

### Multi-threading
- Identify a suitable module in the game where multi-threading can be implemented and implement multi-threading in the chosen module.

### File Handling
- Implement file handling functionality based on your project's requirements.

### Database Integration
- Utilize a database system (e.g., MySQL) based on your project's needs. Identify the relevant data to be stored in the database.

### Error Handling
- Handle any unexpected errors or exceptions.

Note: The specific implementation details and requirements for file handling, Database functionality, and Multi-Threading are left to the student based on their own business logic and project needs.
1 change: 1 addition & 0 deletions MemoryGame/highscore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
880
Binary file added MemoryGame/shapes/2blankTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/Blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/chick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/game-over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/ghost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/giraffe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/high-score.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/lion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/owl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/panda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/teddy-bear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MemoryGame/shapes/win.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
617 changes: 617 additions & 0 deletions MemoryGame/src/main/java/com/mycompany/flipflopgame/FlipFlopGame.form

Large diffs are not rendered by default.

1,191 changes: 1,191 additions & 0 deletions MemoryGame/src/main/java/com/mycompany/flipflopgame/FlipFlopGame.java

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions MemoryGame/src/main/java/com/mycompany/flipflopgame/RankingsTable.form
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="375" max="-2" attributes="0"/>
<EmptySpace pref="19" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
<Component id="Rank" min="-2" pref="107" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="Exit" min="-2" pref="169" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="Exit" pref="31" max="32767" attributes="0"/>
<Component id="Rank" alignment="1" max="32767" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="244" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="Table">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="2" rowCount="99">
<Column editable="false" title="Username" type="java.lang.String"/>
<Column editable="false" title="Score" type="java.lang.Integer"/>
</Table>
</Property>
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
<TableColumnModel selectionModel="0">
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
<Title/>
<Editor/>
<Renderer/>
</Column>
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
<Title/>
<Editor/>
<Renderer/>
</Column>
</TableColumnModel>
</Property>
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="Rank">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Arial" size="18" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="Rankings"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="Exit">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Arial" size="14" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="Exit"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ExitActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>
Loading