This file contains hidden or 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
| <!--TICTACTOE w/ decent AI--> | |
| <!--Made by Cole N and Chris--> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title> Live coding session </title> | |
| </head> | |
| <body> | |
| <h1>TicTacToeJS</h1> |
This file contains hidden or 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
| // Use a while-true loop to both move and attack. | |
| var i = 0; | |
| while(true) { | |
| var enemy = hero.findNearestEnemy(); | |
| if (enemy !== null) { | |
| hero.attack(enemy); | |
| } else { | |
| if (i === 0) { | |
| hero.moveRight(); |
This file contains hidden or 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
| # Concept No. 1: FUNCTIONS | |
| print("print is a function, functions are commands that do things in computer programming") | |
| # Concept No. 1.5 COMMENTS | |
| # Comments are notes for programmers | |
| # The computer will ignore them completely. | |
| # Concept No. 2: VARIABLES | |
| # Variables are containers which hold values. | |
| # myVariable is an example of a variable. |
This file contains hidden or 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
| PhaserJS Book: https://docdro.id/b7wAP1e |
This file contains hidden or 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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Making your first Phaser 3 Game - Part 2</title> | |
| <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> | |
| <style type="text/css"> | |
| body { | |
| margin: 0; | |
| } |
This file contains hidden or 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
| # REFERENCE: https://www.youtube.com/watch?v=WoJA7GGTghk | |
| import pyttsx3 | |
| __Author = "Pythoners" | |
| Y = pyttsx3.init() | |
| Y.setProperty("rate", 115) | |
| x = str(input("what do you want to say ?")) | |
| Y.say(x) |
This file contains hidden or 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
| func generateUniqueIdentifier() -> String { | |
| // Create an Array of 62 Characters | |
| var characters: [String] = [] | |
| characters.append("a") | |
| characters.append("b") | |
| characters.append("c") | |
| characters.append("d") | |
| characters.append("e") | |
| characters.append("f") | |
| characters.append("g") |
This file contains hidden or 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
| # Hangman from Al Sweigart's Invent Your Own Computer Games With Python | |
| import random | |
| HANGMAN_PIC = [ | |
| ''' | |
| +---+ | |
| | | |
| | | |
| | | |
| === | |
| ''', |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <br><br><br><br> | |
| <center> | |
| <h1>Send JSON Data to Server via the HTTP POST Method</h1> | |
| <button onclick="postJSON();">SEND DATA</button> | |
| </center> |
This file contains hidden or 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
| <?php | |
| $data = json_decode(file_get_contents('php://input')); | |
| $myVariable = $data->{'foo'}; | |
| $myOtherVariable = $data->{'bar'}; | |
| ?> |