# data[].attributes.attachment_link.readable_text
Welcome to Singapore!

Welcome to Singapore

A sunny island in Southeast Asia!

× This site was created by (name).

Gardens by the Bay

Merlion

Singapore Zoo

Attractions
Visit Our Attractions

Hotel
Book a Hotel

Food
Explore Local Food

Visit Sentosa

Find out more

Explore Singapore

Nature Gallery

Vanda Miss Joaquim

This is Singapore's national flower.

Smooth-Coated Otters

They are critically endangered!

Mangroves

A unique species of tree.

Singlish Dictionary

No. | Singlish Word | Language of Origin
1 | Alamak | Malay
2 | Kiasu | Hokkien
3 | Bojio | Hokkien
4 | Atas | Malay

National Anthem of Singapore

Click Here For National Anthem in English

Come, fellow Singaporeans; Let us progress towards happiness together

May our noble aspiration bring; Singapore success

Come, let us unite; In a new spirit

Let our voices soar as one; Onward Singapore! Onward Singapore!

Click Here For National Anthem in Chinese

来吧，新加坡人民，让我们共同向幸福迈进；

我们崇高的理想，要使新加坡成功。

来吧，让我们以新的精神，团结在一起；

我们齐声欢呼： 前进吧，新加坡！前进吧，新加坡！

National Anthem (Malay)

Mari kita rakyat Singapura

Sama-sama menuju bahagia

Cita-cita kita yang mulia; Berjaya Singapura

Marilah kita bersatu; Dengan semangat yang baru

Semua kita berseru

Majulah Singapura! Majulah Singapura!

# data[].attributes.attachment_link.readable_text
National Anthem of Singapore

Come, fellow Singaporeans; Let us progress towards happiness together

May our noble aspiration bring; Singapore success

Come, let us unite; In a new spirit

Let our voices soar as one; Onward Singapore! Onward Singapore!

来吧，新加坡人民，让我们共同向幸福迈进；

我们崇高的理想，要使新加坡成功。

来吧，让我们以新的精神，团结在一起；

我们齐声欢呼： 前进吧，新加坡！前进吧，新加坡！

Mari kita rakyat Singapura

Sama-sama menuju bahagia

Cita-cita kita yang mulia; Berjaya Singapura

Marilah kita bersatu; Dengan semangat yang baru

Semua kita berseru

Majulah Singapura! Majulah Singapura!

# data[].attributes.attachment_link.readable_text
﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class GameManager : MonoBehaviour
{
    //Create Gamemanager Instance
    public static GameManager instance;

    // Start is called before the first frame update
    public bool isPaused;

    public GameObject inventoryPanel;
    public GameObject statsPanel;

    public Text moneyText;
    public Text speedText;
    public Text cornText;
    public Text carrotText;
    public Text cabbageText;

    public PlayerScript playerScript;
    public PlayerMovement playerMovement;

    private GameObject currentSelectedObject;
    public GameObject cropSelectionPanel;

    public Text cropInformationName;
    public Text cropInformationDescription;
    public Button cropInformationHarvestButton;
    public GameObject cropInformationUI;

    public AudioSource _as;
    public AudioClip harvestingSound;
    public AudioClip plantingSound;
    public AudioClip inventorySound;

    public Button carrotButton, cornButton, cabbageButton;
    public GameObject shopKeeperUI;
    public AudioClip openShopSound, closeShopSound;

    public Text damageText, hoeDurabilityText, requireGrowthText, sellModifiedText;

    public AudioClip hoePlotSound, notEnoughDurabilitySound;

    public int previousDay = 0;
    public int day = 1;
    public int dailyTaxes;
    public float timeRightNow = 75;

    public AudioClip newDaySound, loseGameSound, winGameSound, clicked;
    public GameObject loseGameUI, winGameUI;
    public bool alreadyWon;

    //Rain Controller
    public ParticleSystem rain;
    public AudioSource rainAs;
    public float rainCounter;
    public bool isRaining;


    void Start()
    {
        instance = this;
        UnpauseGame();
    }

    // Update is called once per frame
    void Update()
    {
        if (!isPaused)
        {
            if (Input.GetKeyUp(KeyCode.E))
            {
                PauseGame();
                OpenInventory();
            }
        }

        timeRightNow += Time.deltaTime;
        rainCounter  += Time.deltaTime;



        if (timeRightNow >= 74 && previousDay == day)
        {
            Taxes();
        }

        if(timeRightNow >= 300)
        {
            NextDay();
        }

        if(day == 30 && playerScript.money >= 10000 && !alreadyWon)
        {
            _as.PlayOneShot(winGameSound, 1f);
            winGameUI.SetActive(true);
            alreadyWon = !alreadyWon;
            PauseGame();
        }
        else if(day==30)
        {
            _as.PlayOneShot(loseGameSound, 1f);
            loseGameUI.SetActive(true);
            PauseGame();
        }

        if (rainCounter >= 60)
        {
            Rain();
            rainCounter = 0;

        }

        if (isRaining)
        {
            rainAs.volume += Time.deltaTime;

        }
        else
        {
            rainAs.volume -= Time.deltaTime;
        }

        
    }

    private void LockCursor()
    {
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;
    }

    private void UnlockCursor()
    {
        Cursor.lockState = CursorLockMode.None;
        Cursor.visible = true;
    }

    public void PauseGame()
    {
        isPaused = true;
        Time.timeScale = 0;
        UnlockCursor();
    }
    public void UnpauseGame()
    {
        isPaused = false;
        Time.timeScale = 1;
        LockCursor();
    }

    public void OpenInventory()
    {
        PauseGame();
        statsPanel.SetActive(true);
        inventoryPanel.SetActive(true);
        UpdateStats();
        _as.PlayOneShot(inventorySound, 1f);
    }

    public void CloseInventory()
    {
        inventoryPanel.SetActive(false);
        statsPanel.SetActive(false);
        UnpauseGame();
    }

    private void UpdateStats()
    {
        moneyText.text = playerScript.money.ToString();
        cornText.text = playerScript.cornSeed.ToString();
        carrotText.text = playerScript.carrotSeed.ToString();
        cabbageText.text = playerScript.cabbageSeed.ToString();
        speedText.text = playerMovement.speed.ToString();
        damageText.text = playerScript.damage.ToString();
        hoeDurabilityText.text = playerScript.hoeDurability.ToString();
        requireGrowthText.text = playerScript.growthModificationPercentage.ToString() + "%";
        sellModifiedText.text = playerScript.priceModificationPercentage.ToString() + "%";
    }

    public void Rain()
    {
        print("Attempt to rain");
        if (isRaining == false)
        {

            if (UnityEngine.Random.value <= 0.2)
            {
                print("Raining");
                isRaining = !isRaining;
                rain.Play(true);
            }
        }
        else if (isRaining == true)
        {
            if (UnityEngine.Random.value <= 0.8)
            {
                isRaining = !isRaining;
                rain.Stop(true);
            }


        }

        isRaining = !isRaining;

    }

    public void GrowACrop(GameObject selectedPlot)
    {
        CheckSeeds();
        PauseGame();
        cropSelectionPanel.SetActive(true);
        currentSelectedObject = selectedPlot;
    }

    public void CloseCropSelect()
    {
        UnpauseGame();
        cropSelectionPanel.SetActive(false);
    }

    public void HoePlot(GameObject selectedPlot)
    {
        if (playerScript.hoeDurability >= 1)
        {
            _as.PlayOneShot(hoePlotSound, 1f);
            playerScript.hoeDurability--;
            selectedPlot.transform.GetChild(0).gameObject.GetComponent<PlotScript>().HoePlot();
        }
        else
        {
            _as.PlayOneShot(notEnoughDurabilitySound, 1f);
        }
    }

    public void GrowACarrot()
    {
        currentSelectedObject.GetComponent<PlotScript>().GrowCarrot();
        CloseCropSelect();
        _as.PlayOneShot(plantingSound, 1f);
        playerScript.carrotSeed--;
    }

    public void GrowACabbage()
    {
        currentSelectedObject.GetComponent<PlotScript>().GrowCabbage();
        CloseCropSelect();
        _as.PlayOneShot(plantingSound, 1f);
        playerScript.cabbageSeed--;
    }
    public void GrowACorn()
    {
        currentSelectedObject.GetComponent<PlotScript>().GrowCorn();
        CloseCropSelect();
        _as.PlayOneShot(plantingSound, 1f);
        playerScript.cornSeed--;
    }

    public void SelectedACrop(GameObject selectedPlot)
    {
        PlotScript plot = selectedPlot.GetComponent<PlotScript>();

        switch (plot.cropType)
        {
            case PlotScript.CropType.CORN:
                cropInformationName.text = "Corn Crop";
                break;
            case PlotScript.CropType.CARROT:
                cropInformationName.text = "Carrot Crop";
                break;
            case PlotScript.CropType.CABBAGE:
                cropInformationName.text = "Cabbage Crop";
                break;
        }

        float timeRemaining = plot.requiredGrowthTime - plot.growthTime;
        if(timeRemaining <= 0)
        {
            cropInformationHarvestButton.interactable = true;
            cropInformationDescription.text = "Time Remaining Til Full Growth: Can be Harvested!";
        }
        else
        {
            cropInformationHarvestButton.interactable = false;
            cropInformationDescription.text = "Time Remaining Til Full Growth: " + timeRemaining.ToString();
        }

        PauseGame();
        cropInformationUI.SetActive(true);
    }

    public void HarvestCrop()
    {
        CloseInformationUI();
        currentSelectedObject.GetComponent<PlotScript>().RemoveCrop();
        _as.PlayOneShot(harvestingSound, 1f);
        playerScript.money += currentSelectedObject.GetComponent<PlotScript>().price;
    }

    public void RemoveCrop()
    {
        CloseInformationUI();
        currentSelectedObject.GetComponent<PlotScript>().RemoveCrop();

    }

    public void CloseInformationUI()
    {
        cropInformationUI.SetActive(false);
        UnpauseGame();
    }
    
    public void CheckSeeds()
    {
        if (playerScript.carrotSeed > 0)
        {
            carrotButton.interactable = true;
        }
        else
        {
            carrotButton.interactable = false;
        }

        if (playerScript.cornSeed > 0)
        {
            cornButton.interactable = true;
        }
        else
        {
            cornButton.interactable = false;
        }

        if (playerScript.cabbageSeed > 0)
        {
            cabbageButton.interactable = true;
        }
        else
        {
            cabbageButton.interactable = false;
        }
    }

    public void OpenShop()
    {
        PauseGame();
        shopKeeperUI.SetActive(true);
        _as.PlayOneShot(openShopSound, 1f)
;
    }

    public void CloseShop()
    {
        UnpauseGame();
        shopKeeperUI.SetActive(false);
        _as.PlayOneShot(closeShopSound, 1f);
    }

    public void NextDay()
    {
        timeRightNow = 0;
        previousDay = day;
    }

    public void Taxes()
    {
        if(playerScript.money >= dailyTaxes)
        {
            playerScript.money -= dailyTaxes;
            dailyTaxes = (int)(dailyTaxes * 1.2f);
            _as.PlayOneShot(newDaySound, 1);
            day++;
        }
        else
        {
            _as.PlayOneShot(loseGameSound, 1f);
            loseGameUI.SetActive(true);
            PauseGame();
        }
    }
    public void CloseWinUI()
    {
        UnpauseGame();
        winGameUI.SetActive(false);
        _as.PlayOneShot(clicked, .8f);
    }
    public void ReturnToMain()
    {
        SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
        _as.PlayOneShot(clicked, .8f);
    }
}

# data[].attributes.headline
# generated by mBlock5 for HaloCode# codes make you happyimport event, halo, time# initialize variablescount = 0@event.startdef on_start():    global count    count = 0    while True:        count = count + 1        if count == 1:            halo.led.show_single(count, 255, 0, 0)            time.sleep(1)        if count == 2:            halo.led.show_single(count, 0, 255, 0)            time.sleep(1)        if count == 3:            halo.led.show_single(count, 0, 0, 255)            time.sleep(1)        if count == 4:            halo.led.show_single(count, 255, 255, 0)            time.sleep(1)        if count == 5:            halo.led.show_single(count, 0, 255, 255)            time.sleep(1)        if count == 6:            halo.led.show_single(count, 255, 255, 255)            time.sleep(1)        if count == 7:            halo.led.show_single(count, 255, 0, 0)            time.sleep(1)        if count == 8:            halo.led.show_single(count, 0, 255, 0)            time.sleep(1)        if count == 9:            halo.led.show_single(count, 0, 0, 255)            time.sleep(1)        if count == 10:            halo.led.show_single(count, 255, 255, 0)            time.sleep(1)        if count == 11:            halo.led.show_single(count, 0, 255, 255)            time.sleep(1)        if count == 12:            halo.led.show_single(count, 255, 255, 255)            time.sleep(1)

# data[].attributes.subject
# generated by mBlock5 for HaloCode# codes make you happyimport event, halo, time# initialize variablescount = 0@event.startdef on_start():    global count    count = 0    while True:        count = count + 1        if count == 1:            halo.led.show_single(count, 255, 0, 0)            time.sleep(1)        if count == 2:            halo.led.show_single(count, 0, 255, 0)            time.sleep(1)        if count == 3:            halo.led.show_single(count, 0, 0, 255)            time.sleep(1)        if count == 4:            halo.led.show_single(count, 255, 255, 0)            time.sleep(1)        if count == 5:            halo.led.show_single(count, 0, 255, 255)            time.sleep(1)        if count == 6:            halo.led.show_single(count, 255, 255, 255)            time.sleep(1)        if count == 7:            halo.led.show_single(count, 255, 0, 0)            time.sleep(1)        if count == 8:            halo.led.show_single(count, 0, 255, 0)            time.sleep(1)        if count == 9:            halo.led.show_single(count, 0, 0, 255)            time.sleep(1)        if count == 10:            halo.led.show_single(count, 255, 255, 0)            time.sleep(1)        if count == 11:            halo.led.show_single(count, 0, 255, 255)            time.sleep(1)        if count == 12:            halo.led.show_single(count, 255, 255, 255)            time.sleep(1)

# data[].attributes.attachment_link.readable_text
#Space game
import pygame
import random
import player
import aliens
import misc
import playerProjectile
import alienProjectile

# Start the game
pygame.init()
screen = pygame.display.set_mode((misc.game_width, misc.game_height))
clock = pygame.time.Clock()
running = True

# Load the background image
background_pic = pygame.transform.scale(pygame.image.load("./assets/background.png"),(misc.game_width,misc.game_height))

# Create the player object
player = player.Player(misc.game_width/2, 600)

# Player projectile variables
allPlayerProj = []
projectile_timer = 0
projectile_timer_max = 60
player_ammo = 10
projectile_duplicate = 5

# Initialise gamestate
gamestate = 'play'

# Alien variables
alien_timer = 0
allAliens = []

# Alien projectile variables
allAlienProj = []
alienProj_timer = random.randint(50,200)

# Player health
health = 300

# Main game loop below
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
            running = False

    # Shoot the player projectile when the spacebar is pressed
    keys = pygame.key.get_pressed()
    if keys[pygame.K_SPACE] and player_ammo > 0 and projectile_duplicate > 5:
        allPlayerProj.append(playerProjectile.Projectile(player.x, player.y))
        player_ammo -= 1
        projectile_duplicate = 0
    projectile_duplicate += 1

    projectile_timer += 1
    if projectile_timer >= projectile_timer_max and player_ammo < 10:
        player_ammo += 1
        projectile_timer = 0

    # Draw the background, aliens, player and projectiles
    screen.blit(background_pic,(0,0))
    player.update(screen)

    # Remove projectiles that are out of the screen
    for index in range(len(allPlayerProj), 0, -1):
        playerproj = allPlayerProj[index - 1]
        if playerproj.y < 0 - playerproj.height:
            allPlayerProj.remove(playerproj)
        playerproj.update(screen)

    # When the game is in play
    if gamestate is 'play':
        # Randomly create new aliens over time
        if alien_timer <= 0:
            alien_timer = random.randint(50,150)
            allAliens.append(aliens.Alien(random.randint(200,750), 0, 2))
        else:
            alien_timer -= 1

        for index in range(len(allAliens)-1, -1, -1):
            #Randomly create alien projectiles
            alien = allAliens[index]
            if alienProj_timer <= 0:
                allAlienProj.append(alienProjectile.Projectile(alien.x, alien.y))
                alienProj_timer = random.randint(50,150)
            else:
                alienProj_timer -= 1
            # Check for collision between player projectiles and aliens and remove aliens that are hit
            for projectile in allPlayerProj:
                if projectile.hitbox.colliderect(alien.hitbox):
                    alien.health -= 1
                    allPlayerProj.remove(projectile)
                if alien.health <= 0:
                    allAliens.remove(alien)
                    break
            # Check if game is lost
            if alien.y > 500 or health <= 0:
                gamestate = 'end'
             #Update all aliens
            alien.update(screen)

        # Check for collision between alien projectiles and player
        for projectile in allAlienProj:
            if projectile.hitbox.colliderect(player.hitbox):
                allAlienProj.remove(projectile)
                health -= 30

        # Remove projectiles that are out of screen
        for index in range(len(allAlienProj), 0, -1):
            alienproj = allAlienProj[index-1]
            if alienproj.y > misc.game_height:
                allAlienProj.remove(alienproj)
            alienproj.update(screen)

    # Update the game display
    pygame.display.flip()
    clock.tick(50)
    pygame.display.set_caption("MY GAME fps: " + str(clock.get_fps()))

# data[].attributes.body
https://share.hsforms.com/18YUl4umEQ2m3eFK_a2edoA3oieh