MS Coding Camp(working title)

This forum is for discussion about anything else.
User avatar
Sudo_Nym
Sudo_Nym
Pseudo Newbie
User avatar
User avatar
Sudo_Nym
Pseudo Newbie
Pseudo Newbie
Posts: 1144
Joined: March 12, 2007
Location: Washington

Post Post #15 (isolation #0) » Fri Nov 04, 2016 5:08 am

Post by Sudo_Nym »

I'm /in to learn stuff.
One time, back in 'nam, Sudo was set upon by an entire squadron of charlies. He challenged them all to a game of Pictionary, which he won resoundingly. The charlies were forced to not only surrender the skirmish, but also their world-famous chili recipe, which Sudo sold to Texas for a hefty profit. Sudo is a master of diplomacy.
User avatar
Sudo_Nym
Sudo_Nym
Pseudo Newbie
User avatar
User avatar
Sudo_Nym
Pseudo Newbie
Pseudo Newbie
Posts: 1144
Joined: March 12, 2007
Location: Washington

Post Post #43 (isolation #1) » Thu Nov 10, 2016 4:56 pm

Post by Sudo_Nym »

This was fun, though a bit simple. Here's my code for SendMessage:
Spoiler:
using UnityEngine;
using System.Collections;

public class SendMessage : MonoBehaviour {

// Use this for initialization
void Start () {
Debug.Log("Hello World!");
Debug.Log(@"Please enjoy the following poem:
A hobo always goes and goes
He does not stop to change his clothes
He rides the rail that he has chose.
Water pours out from a hose!

Do not show me tramp or bum
Tramp may ride, and bum's a chum
But both beg from the other one
Kids, stop chewing bubble gum!

Neither works like hobo does
Carving coin and twisting fuzz
Into a pretty pair of gloves
The past tense of 'to be' is 'was'!

A hobo, he will never steal
Unless it is to get a meal
Or cash, or gems, or fur of seal
Some Japanese eat broiled eel!

But saddest: those who will not ride
At all, but stand and die inside
As world spins on and throws aside
The past, and hope, and faith, and pride
In one direction trains do glide
Not looking back, on windward side
Across the continent's divide
The hobo rides and rides and rides
I'll eat anything that's fried
--Mindbender Steve, The Appeal to Reason, 1916");
Debug.Log("Thank you.");

}

// Update is called once per frame
void Update () {

}
}
One time, back in 'nam, Sudo was set upon by an entire squadron of charlies. He challenged them all to a game of Pictionary, which he won resoundingly. The charlies were forced to not only surrender the skirmish, but also their world-famous chili recipe, which Sudo sold to Texas for a hefty profit. Sudo is a master of diplomacy.
User avatar
Sudo_Nym
Sudo_Nym
Pseudo Newbie
User avatar
User avatar
Sudo_Nym
Pseudo Newbie
Pseudo Newbie
Posts: 1144
Joined: March 12, 2007
Location: Washington

Post Post #55 (isolation #2) » Wed Nov 23, 2016 7:51 pm

Post by Sudo_Nym »

I got distracted by Pokemon, but here's my code:
Spoiler:
public class Variablation : MonoBehaviour {

// Use this for initialization
void Start () {
int number1 = 1;
double number2 = 1.0;
Debug.Log(number1 == number2);
Debug.Log(!(!(number1 == number2)));
Debug.Log(number1 == number2 || !(number1 == number2));
Debug.Log(number1 == number2 && (number1 == number2 || !(number1 == number2)));
number2 = 2.0;
Debug.Log(number1 == number2);
Debug.Log(!(!(number1 == number2)));
Debug.Log(number1 == number2 || !(2 * number1 == number2));
Debug.Log(number1 == number2 && (number1 == number2 || !(number1 == number2)));
string rando = "This is a message that I wrote for the purpose of concatenating";
Debug.Log(rando + " I have concenated it with the following double! " + number2 + " Behold!");
Debug.Log(rando + " Tremble in fear as I concenate it with a boolean that I calculate with this very line of code! " + (number1 == number2));
Debug.Log(number2 * 19);
Debug.Log(2147483647);
}

// Update is called once per frame
void Update () {

}
}


It seems to work as expected. I do have some questions, though, that I can't be bothered to futz with Discord right now to ask:
1) When I first create a project, it tells me that the line endings are inconsistent. What's the deal with this, and how do I deal with it? Right now, it just spawns a message that prompts me to fix automatically if I close and reopen, but I imagine there has to be a better way.
2) Is there a power operator? I wanted to print the max value for an integer the easy way, but then using ^ didn't work so I calculated externally and plugged it in. There's probably a better, mathier solution to this, though.
One time, back in 'nam, Sudo was set upon by an entire squadron of charlies. He challenged them all to a game of Pictionary, which he won resoundingly. The charlies were forced to not only surrender the skirmish, but also their world-famous chili recipe, which Sudo sold to Texas for a hefty profit. Sudo is a master of diplomacy.
User avatar
Sudo_Nym
Sudo_Nym
Pseudo Newbie
User avatar
User avatar
Sudo_Nym
Pseudo Newbie
Pseudo Newbie
Posts: 1144
Joined: March 12, 2007
Location: Washington

Post Post #61 (isolation #3) » Thu Nov 24, 2016 7:01 am

Post by Sudo_Nym »

I'm using the editor that came with unity, and I am typing everything manually. Code stick won't ruin until I close the editor, then reopen it to spawn the pop-up about inconsistent line endings.
One time, back in 'nam, Sudo was set upon by an entire squadron of charlies. He challenged them all to a game of Pictionary, which he won resoundingly. The charlies were forced to not only surrender the skirmish, but also their world-famous chili recipe, which Sudo sold to Texas for a hefty profit. Sudo is a master of diplomacy.
Post Reply

Return to “General Discussion”