Originally Posted by
W4N73D1
Apparently trying to reply to you with a quote is just sending me to a blank editor so i cant quote that huge post lol
Yeah i broke the fabric of space and time... Mission accomplished.
Originally Posted by
W4N73D1
I Wonder how hard it would be to make a simple Card game in java, Thats also another one of my goals like make a game in a Hearthstone Style..
OK, there is a difference between simple and Hearthstone Style I just tried to convert some main functionality from a memory game i made in AS3 in 2011. Took me while to let the program print out a random deck like so:
3 - 2 - 5 - 6
7 - 1 - 3 - 7
2 - 0 - 0 - 1
4 - 6 - 5 - 4
Code:
#include <iostream>
#include <chrono> // chrono
#include <random> // minstd_rand0
#include <vector>
#include <cstdlib> // atoi (although it compiled without it.)
// g++ memory.cpp -O3 -s -std=c++11 -o memory
// Simple random number generator, same seed will produce the same output
class simple_rand
{
private:
std::minstd_rand0 rand;
public:
void seed ( void );
void seed ( unsigned int value );
unsigned int get ( unsigned int min, unsigned int max );
};
// Seed with current time
void
simple_rand::seed ( void )
{
rand.seed( std::chrono::system_clock::now().time_since_epoch().count() );
}
// Seed with number
void
simple_rand::seed ( unsigned int value )
{
rand.seed( value );
}
// Get random number in the range of min up to max
unsigned int
simple_rand::get ( unsigned int min, unsigned int max )
{
return ( rand() % ( max - min + 1 ) ) + min;
}
int main( int argc, char **argv )
{
unsigned int i, r;
simple_rand rnd;
std::vector<int> card_fronts;
std::vector<int> card_list;
// Get seed from command lines first argument
if (argc > 1) {
rnd.seed( atoi( argv[1] ) );
}
// 8 card fronts, each 2 times
for (i = 0; i < 8; i++) {
card_fronts.push_back(i);
card_fronts.push_back(i);
}
// Randomize cards on deck
for (i = 0; i < 16; i++) {
// Get random number between 0 and left over cards
r = rnd.get( 0, card_fronts.size() - 1 );
// Add card to the current deck
card_list.push_back( card_fronts.at(r) );
// Remove card from fronts to not use it again.
card_fronts.erase( card_fronts.begin() + r );
}
// Dsiplay card deck
for (i = 1; i <= 16; i++) {
std::cout << card_list[i-1];
if ( i % 4 == 0 ) {
std::cout << "\n";
} else {
std::cout << " - ";
}
}
return 0;
}
Originally Posted by
W4N73D1
And i dont even have a bike lol i have a skateboard that i cant seem to stop on
That leaves you with either walking or jumping of your skateboard at the right time. Its like 20years ago that i tried a skateboard the last time. And now after saying that i feel old...
Originally Posted by
W4N73D1
I Just have to force myself to stay awake till atleast 7pm , after that i will wake up at 3am every morning which is perfect for me
I should be in bed at 9pm, which was 30 minutes ago but almost always stay up till 10 and get up at 4:30.
Originally Posted by
W4N73D1
I Have never even been inside of a dentists office so im still really nervous , Plus i have a problem with my jaw from fighting its dislocated or something i cant open it very wide without it popping
Then you should definitely visit a dentist, its going to be more problematic if you keep pushing it aside. Believe me i did this until i had real bad tooth pain and paid 2000€ to get my teeth fixed/replaced. Not worth it if it can be fixed earlier.