Co-operative Projects

Moderators: SimonPrg123
Number of threads: 179
Number of posts: 236

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: C# programmer to assist on project(s) for free Posted by Tempos on 2 Feb 2012 at 6:28 PM
I am so itching to make an XNA game myself and LOVE math handling classes, but am too busy with my current personal project, and work.

You seem lite on requirements, unless you have these skill yourself (I'm bragging a bit in adding them)... What about extensions, functions (static procedures should not be called a method, methods operate on an instance not a class), enum, collections (more specific than lists), and exceptions? Also if you want multi-player; authentication protocols, multi-threading, data modeling, and database experiences.

Why do you want Windows Forms experience?

While BitConverter is nice, it doesn't test bits. Here is a class that will help you (and me) facilitate bit testing...

public static class Bit
{
	public static uint And(string number1, string number2)
	{
		return (ToNumber(number1) & ToNumber(number2));
	}

	public static uint And(uint number1, uint number2)
	{
		return (number1 & number2);
	}

	public static uint Or(string number1, string number2)
	{
		return (ToNumber(number1) | ToNumber(number2));
	}

	public static uint Or(uint number1, uint number2)
	{
		return (number1 | number2);
	}

	public static uint XOr(string number1, string number2)
	{
		return (ToNumber(number1) ^ ToNumber(number2));
	}

	public static uint XOr(uint number1, uint number2)
	{
		return (number1 ^ number2);
	}

	public static uint Not(string number)
	{
		return (~ToNumber(number));
	}

	public static uint Not(uint number)
	{
		return (~number);
	}

	public static uint LeftShift(string number, int numberOfDigits)
	{
		return (ToNumber(number) << numberOfDigits);
	}

	public static uint LeftShift(uint number, int numberOfDigits)
	{
		return (number << numberOfDigits);
	}

	public static uint RightShift(string number, int numberOfDigits)
	{
		return (ToNumber(number) >> numberOfDigits);
	}

	public static uint RightShift(uint number, int numberOfDigits)
	{
		return (number >> numberOfDigits);
	}

	public static bool TestBit(string number, int bitPosition)
	{
		return ((ToNumber(number) & (uint)Math.Pow(2, bitPosition)) != 0);
	}

	public static bool TestBit(uint number, int bitPosition)
	{
		return ((number & (uint)Math.Pow(2, bitPosition)) != 0);
	}

	public static uint ClearBitmask(string number, string mask)
	{
		return ClearBit(ToNumber(number), ToNumber(mask));
	}

	public static uint ClearBitmask(uint number, uint mask)
	{
		return ClearBit(number, mask);
	}

	public static uint SetBitmask(string number, string mask)
	{
		return SetBit(ToNumber(number), ToNumber(mask));
	}

	public static uint SetBitmask(uint number, uint mask)
	{
		return SetBit(number, mask);
	}

	public static byte SetBit(byte mask, byte srcValue)
	{
		srcValue ^= (byte)(((byte)(-1 ^ srcValue)) & mask);
		return srcValue;
	}

	public static byte ClearBit(byte mask, byte srcValue)
	{
		srcValue ^= (byte)(((byte)(0 ^ srcValue)) & mask);
		return srcValue;
	}

	public static uint SetBit(uint mask, uint srcValue)
	{
		srcValue ^= (((uint)(-1 ^ srcValue)) & mask);
		return srcValue;
	}

	public static uint ClearBit(uint mask, uint srcValue)
	{
		srcValue ^= (((uint)(0 ^ srcValue)) & mask);
		return srcValue;
	}

	public static string ToBinary(string number)
	{
		return ToBinary(ToNumber(number));
	}

	public static string ToBinary(uint number)
	{
		try
		{
			return Convert.ToString(number, 2);
		}
		catch
		{
			return "0";
		}
	}

	public static uint ToValue(string numberString)
	{
		try
		{
			return Convert.ToUInt32(numberString, 2);
		}
		catch
		{
			return 0;
		}
	}

	public static uint ToNumber(string numberString)
	{
		try
		{
			return Convert.ToUInt32(numberString);
		}
		catch
		{
			return 0;
		}
	}
}

Thread Tree
AName *Expired, please delete!* on 1 Jan 2012 at 8:57 PM
AName *Expired, please delete!* on 3 Feb 2012 at 11:12 AM



 

Recent Jobs