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

Dev #1

Open
wants to merge 8 commits 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,31 @@ This part of the project is meant to act as a generic frontend for a game board

## Description

Our project has various functionalities out of which there is a grid generation that can be re-used for other team projects as required.

### Dependencies
App.java is a API class that exposes launchGrid method which is used to launch a grid based on the number of rows and columns.

*
This will generate a grid by using javafx.

### Executing program
*

### Example scenarios

A board game like chess can use this functionlity to create a grid

### Instructions for calling the API

Import the App.java from com.frontend

Call App.launchGrid function

Here is the code
------------------------------------------

import com.frontend;

App.launchGrid(8,8);
------------------------------------------


## Authors
* [Tabithat Abraham]()
Expand Down
55 changes: 55 additions & 0 deletions oldfiles/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
physics: {
default: "arcade",
arcade: {
gravity: { y: 200 },
},
},
scene: {
preload: preload,
create: create,
},
};

var game = new Phaser.Game(config);

function preload() {
this.load.setBaseURL("http://labs.phaser.io");

this.load.image("sky", "assets/skies/space3.png");
this.load.image("logo", "assets/sprites/phaser3-logo.png");
this.load.image("red", "assets/particles/red.png");
}

function create() {
this.add.image(400, 300, "sky");

var particles = this.add.particles("red");

var emitter = particles.createEmitter({
speed: 100,
scale: { start: 1, end: 0 },
blendMode: "ADD",
});

var logo = this.physics.add.image(400, 100, "logo");

logo.setVelocity(100, 200);
logo.setBounce(1, 1);
logo.setCollideWorldBounds(true);

emitter.startFollow(logo);
}
</script>
</body>
</html>
10 changes: 10 additions & 0 deletions oldfiles/javaApp/DemoApp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package javaApp;

public class DemoApp {

public static void main (String[] args) {

App.launchGrid(2,2);
}

}
7 changes: 7 additions & 0 deletions oldfiles/javaApp/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package javaApp;

public class Main{
public static void main(String[] args) {
System.out.println("this");
}
}
1 change: 1 addition & 0 deletions oldfiles/javaApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"Hello"
46 changes: 46 additions & 0 deletions oldfiles/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Modules
const { app, BrowserWindow } = require("electron");

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;

// Create a new BrowserWindow when `app` is ready
function createWindow() {
mainWindow = new BrowserWindow({
width: 800,
height: 800,
webPreferences: {
// --- !! IMPORTANT !! ---
// Disable 'contextIsolation' to allow 'nodeIntegration'
// 'contextIsolation' defaults to "true" as from Electron v12
contextIsolation: false,
nodeIntegration: true,
},
});

// Load index.html into the new BrowserWindow
mainWindow.loadFile("phaser3-tutorial-src/part1.html");
//mainWindow.loadFile("index.html");

// Open DevTools - Remove for PRODUCTION!
//mainWindow.webContents.openDevTools();

// Listen for window being closed
mainWindow.on("closed", () => {
mainWindow = null;
});
}

// Electron `app` is ready
app.on("ready", createWindow);

// Quit when all windows are closed - (Not macOS - Darwin)
app.on("window-all-closed", () => {
if (process.platform !== "darwin") app.quit();
});

// When app icon is clicked and app is running, (macOS) recreate the BrowserWindow
app.on("activate", () => {
if (mainWindow === null) createWindow();
});
Loading