This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CheckPrimeFactors { | |
public static void main(String args[]) { | |
int number = 78818740; | |
int count = 0; | |
for (int factor = 2; factor <= number; factor++){ | |
while (number % factor == 0){ | |
number = number / factor; | |
count++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module zybo_top( | |
input CLK, | |
input RST, | |
output reg [3:0] LED | |
); | |
parameter LED_COUNTER_1SEC = 26'd124999999; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SwingBat : MonoBehaviour { | |
private int r = 12; // Rotation Speed | |
private int r_sum = 0; | |
private int r_max = 360; | |
// Use this for initialization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ShootBall : MonoBehaviour { | |
private float timer = 0.0f; | |
private float timeLimit = 1.0f; | |
public static bool shootSwitch; | |
// Use this for initialization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class DeleteBall : MonoBehaviour { | |
private Rigidbody rig; | |
// Use this for initialization | |
void Start () { | |
rig = this.GetComponent<Rigidbody>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class AddScore : MonoBehaviour { | |
public static int score = 0; | |
public Text scoreText; | |
private int highScore = 0; | |
public Text highScoreText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class WallEffect : MonoBehaviour { | |
private ParticleSystem particle; | |
public int i; | |
// Use this for initialization | |
void Start () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class MovePlayer : MonoBehaviour { | |
private bool d_positive; | |
private float x; | |
private float x_sum = 0.0f; | |
private float x_max = 6.0f; | |
private float player_x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SoundBat : MonoBehaviour { | |
private AudioSource audioSourceBat; | |
public AudioClip seBat; | |
// Use this for initialization | |
void Start () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class CountDownTimer : MonoBehaviour { | |
public static int gameTimerInt; | |
private float gameTimerFloat; | |
public Text timeText; |
OlderNewer