Skip to content

Instantly share code, notes, and snippets.

View joshuaChoiXD's full-sized avatar
💭
https://youtu.be/5UlJplyZkN4?t=1137

joshuaXD joshuaChoiXD

💭
https://youtu.be/5UlJplyZkN4?t=1137
View GitHub Profile
using System;
using System.Reflection;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using System.Globalization;
using System.Linq;
using Discord.API;
using Discord.Webhook;
@joshuaChoiXD
joshuaChoiXD / gist:5f1eb4311a283d14cbf83fa5a4eeee1f
Created November 25, 2020 10:57
CodeCombat Game Development 3 (1 - 10) Answers
#CodeCombat
#Game Development 3
#Level 1 - 10 Answers
#Level 1
ui.setText("directions", "Code Provided by Revolution Game")
def shouldAttack(who, target):
if who.type == "scout" and target.type == "soldier":
return True
if who.type == "soldier" and target.type == "thrower":
@joshuaChoiXD
joshuaChoiXD / gist:64f2ac44d65c64e2e18ff02704008b01
Created November 19, 2020 09:30
CodeCombat Introduction to Computer Science (Level 1 - 18) Answers
#CodeCombat
#Introduction to Computer Science
#Level 1 - 18 Answers(Not included Challenge Levels)
#Python
#Check out my Game Development 1 & 2 Answers!
#Level 1
hero.moveRight()
hero.moveDown()
hero.moveRight()
@joshuaChoiXD
joshuaChoiXD / gist:592392c1b27b96aaf014f0827d78b3de
Created November 19, 2020 07:47
CodeCombat Game Developement Level 1 - 16 Answers
#CodeCombat Game Development
#Python
#Level 1 - 16 Answers
#Check out my other answers for Game Development 2
#Anything after the hashtag the computer won't run, so I will only provide necessary codes.
#Just copy, dont ask :)
#btw I will change the code to make finishing the levels easier and faster
#Level 1
game.spawnXY("fence", 39, 16)
@joshuaChoiXD
joshuaChoiXD / gist:3b73821d6dec275a2e4561eb34723523
Created November 18, 2020 09:51
CodeCombat Game Development 2 (Q.21 - 29) Answers
#CodeCombat Game Development 2
#Q.21 - 29 Answers
#Welcome to tell me any opinion of my codes.
#Check out my other Q.1 - 20 Answers
#Level 21
# Mushrooms allow the player to destroy fences for a time.
player = game.spawnPlayerXY('captain', 22, 45)
player.maxSpeed = 30
@joshuaChoiXD
joshuaChoiXD / gist:f8c987ea6c0857b9f994c17f82363a7b
Created November 18, 2020 08:37
CodeCombat Game Development 2 (Q.11 - 20) Answers
#CodeCombat Game Development 2
#Q.11 - 20 Answers
#Python
#Level 11
# Use timers to spawn enemies and items.
# This spawns two aggressive munchkins.
def spawnMunchkins():
munchkin1 = game.spawnXY("munchkin", 2, 12)
@joshuaChoiXD
joshuaChoiXD / gist:e2bc36c9ccb75c326a67782d3dd27ed1
Last active November 17, 2020 12:52
Game Development 2(Level 1 - 10) Answers
#Game Development 2
#Level 1 - 10 Answers
#Python
#Level 1
# Add a soldier to the level to prevent ogres from
crossing the path.
# Command the soldier using an event handler