Skip to content

Instantly share code, notes, and snippets.

View gg-spyda's full-sized avatar
:electron:
Zen State

Gjvon Graves gg-spyda

:electron:
Zen State
  • Houston Texas
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
@gg-spyda
gg-spyda / index.html
Created September 11, 2017 15:47
Assignment 1
<script src="vue.js"></script>
<div id="exercise">
<!-- 1) Fill the <p> below with your Name and Age - using Interpolation -->
<p>{{name}} - {{age}}</p>
<!-- 2) Output your age, multiplied by 3 -->
<p>{{age}} * 3 = {{ doMath() }}</p>
<!-- 3) Call a function to output a random float between 0 and 1 (Math.random()) -->
<p>Random Number -> {{getRandom()}}</p>
<!-- 4) Search any image on Google and output it here by binding the "src" attribute -->
@gg-spyda
gg-spyda / NonPlayerCharacter.java
Last active November 18, 2018 15:21
Using Observer Pattern for Games: Example
import java.util.Observable;
/**
* Created by gjvongraves on 3/13/17.
*/
public class NonPlayerCharacter extends Observable{
/* Bella is in control over many aspects of the game's world.
Specifically, she makes sure the user is not attacked by random NPCs.
There is only one NonPlayerCharacter. Hence, she will be a singleton
*/
@gg-spyda
gg-spyda / Main.java
Created September 5, 2016 01:51
Exceptions in Java
import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int myAge;
Scanner scanner = new Scanner(System.in);
//try statement. Make sure myAge is indeed, an integer
try{