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
| -- by @GabrielModog -- Tiny code in Lua to Sort things... [Not working well] https://ideone.com/b364bP | |
| array = {93, 11, 33, 53, 71} | |
| --[[ | |
| -- New code to test it O(n^2) http://ideone.com/t7uBfE | |
| n = #array | |
| for i = 1, n do | |
| for j = 1, n-1 do | |
| if (array[j] > array[j+1]) then | |
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
| // by GabrielModog - Sort simple data exercise | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int Swap(int left, int right, int array[]){ | |
| if(array[left] == 0 || array[right] == 0){ | |
| return false; | |
| } | |
| if(array[left] != array[right]){ | |
| int temp = array[left]; |
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
| -- main.lua Pong by @GabrielModog // in development 07/06/2017 | |
| function love.load() | |
| love.graphics.setBackgroundColor(205, 220, 221) | |
| x, y, w, h, xVel = 100, 100, 30, 100, 1 | |
| -- There's a pong | |
| -- Function to Draw boxes | |
| function drawBox(x_t, y_t, w_t, h_t, r, g, b) | |
| local ColorRGB = {r, g, b, 80} | |
| love.graphics.setColor (ColorRGB) | |
| love.graphics.rectangle ("fill", x_t, y_t, w_t, h_t ) |
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
| #include <iostream> | |
| #include <SFML/Graphics.hpp> | |
| int main(int argc, char* argv[]){ | |
| /// WINDOW SETEUP | |
| sf::RenderWindow window(sf::VideoMod(1080, 960),"Something to Play", sf::Style::Close | sf::Style::Resize); | |
| /// TEST SOMETHING TO DRAW ON SCREEN | |
| sf::RectangleShape player(sf::Vector2f(100.0f, 100.0f)); | |
| player.setFillColor(sf::Color::Red); | |
| player.setOrigin(50.0f, 50.f); |
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
| // Code por GabrielModog - JOKENPOx 0.0.3v | |
| // http://github.com/gabrielmodog | |
| /* | |
| Ideas to adding | |
| - Put some rounds, maximum 3 rounds. | |
| - Organize things that show in console. | |
| - Adding Lizard and Spock. | |
| - Put the code works with graphic interface. | |
| */ |
NewerOlder