Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Zen State

Gjvon Graves Jivvie

:electron:
Zen State
  • Houston Texas
View GitHub Profile
@Jivvie
Jivvie / Main.java
Created Sep 5, 2016
Exceptions in Java
View Main.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{
@Jivvie
Jivvie / NonPlayerCharacter.java
Last active Nov 18, 2018
Using Observer Pattern for Games: Example
View NonPlayerCharacter.java
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
*/
View index.html
<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 -->
View Simple 3X3 Matrix in Javascript
<!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>
You can’t perform that action at this time.